sigil/UI

Input

A styled text input that reads border, radius, and focus tokens from your token file.

Import

import { Input } from "@sigil-ui/components";

Preview

Usage

<Input placeholder="Enter your email" />

With label

Pair with a <label> or the Label component for accessibility:

import { Input, Label, Stack } from "@sigil-ui/components";

<Stack gap={8}>
  <Label htmlFor="name">Full name</Label>
  <Input id="name" placeholder="Lina Torres" />
</Stack>

With icons

Use iconLeft and iconRight to render elements inside the input.

import { Search, Eye } from "lucide-react";

<Input iconLeft={<Search className="size-4" />} placeholder="Search..." />
<Input iconRight={<Eye className="size-4" />} placeholder="Password" type="password" />

Error state

Pass a string to error to show both the error styling and an error message. Pass true for styling only.

<Input error="Please enter a valid email address" placeholder="you@example.com" />
<Input error={true} placeholder="Error styling, no message" />

Disabled

<Input disabled placeholder="Disabled input" />

Token integration

Input reads these CSS variables from your token file:

CSS VariableUsed for
--s-backgroundInput background
--s-textInput text color
--s-text-mutedPlaceholder color
--s-borderDefault border
--s-border-styleBorder style
--s-primaryFocus border and ring
--s-errorError state border and message
--s-radius-inputBorder radius
--s-duration-fastFocus transition

Props

PropTypeDefaultDescription
errorstring | booleanError state. String shows a message below the input.
iconLeftReactNodeIcon or element on the left
iconRightReactNodeIcon or element on the right
disabledbooleanfalseDisable interactions
classNamestringAdditional CSS classes

Plus all standard <input> HTML attributes (type, placeholder, value, onChange, etc.).

Accessibility

  • Uses native <input> element
  • Pair with <label> using matching htmlFor/id for screen reader support
  • Error state adds aria-invalid="true"
  • Error message renders with role="alert"
  • Disabled state uses the native disabled attribute
Studiodefault
Presets
primary
secondary
background
surface
text
border
accent
success
warning
error
info
display
body
mono
heading wt
600
heading trk
-0.025em
base size
16px
page margin
24px
section pad
64px
card pad
24px
grid gap
24px
stack gap
12px
global
8px
button
8px
card
12px
input
6px
border w
1px
style
card border
card shadow
btn shadow
glow
spring
Type
Duration
0.20
Bounce
1.00
easing
cubic-bezier(0.16, 1, 0.3, 1)
fast
150ms
normal
200ms
slow
300ms
hover scale
1.02
press scale
0.98
hover lift
-1px
stagger
50ms
weight
transform
hover
active scale
0.98
min-width
0px
letter sp
0.000em
icon gap
8px
shadow
hover
border
shadow
padding
24px
title size
1px
title wt
desc size
0.875px
aspect
outline
height
36px
focus ring
2px
focus ring
h1 size
2.25px
h2 size
1.875px
h3 size
1.5px
h4 size
1.25px
weight
tracking
-0.020em
leading
1.20
pattern
pattern α
0.03
noise
gradient
grad angle
180°
height
50px
blur
12px
border
padding
24px
item gap
24px
min-height
600px
padding Y
80px
content-max
680px
layout
title size
56px
desc size
18px
padding Y
64px
max-width
600px
layout
title size
36px
padding Y
48px
columns
4
gap
36px
content-max
1200px
rail-gap
24px
grid-cell
50px
cross-stroke
1.5px
navbar-h
50px
bento-gap
16px
grid lines
dots
cell borders
cell bg
Gutter
Margin
content
hero
navbar
rail visible
enabled