Input
Text input with built-in label, helper, error and icon slots. Uses semantic theme tokens.
Examples
With label, required and icon
Set label/required directly on Input — no need to compose with FormLabel.
<Inputlabel="Name"requiredleftSlot={<User size={16} />}value={name}onChange={(e) => setName(e.target.value)}/>
Helper text
We will never share your email.
<Inputlabel="Email"type="email"leftSlot={<AtSign size={16} />}helperText="We will never share your email."/>
Error state
Please enter a valid email.
<Inputlabel="Email"leftSlot={<AtSign size={16} />}defaultValue="invalid-email"error="Please enter a valid email."/>
Disabled
<Input label="Read-only" disabled value="Cannot edit" />
API Reference
Props of the Input component.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Renders FormLabel above the input. |
required | boolean | false | Asterisk on label + native required. |
helperText | string | — | Hint shown below. Ignored when error is set. |
error | string | boolean | — | Error message (or just visual state). |
leftSlot | ReactNode | — | — |
rightSlot | ReactNode | — | — |
variant | 'outline' | 'filled' | 'underlined' | 'outline' | — |
labelProps | Partial<FormLabelProps> | — | Pass-through to internal FormLabel. |