BenixBenix DSv1.1.0

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.

<Input
label="Name"
required
leftSlot={<User size={16} />}
value={name}
onChange={(e) => setName(e.target.value)}
/>

Helper text

We will never share your email.

<Input
label="Email"
type="email"
leftSlot={<AtSign size={16} />}
helperText="We will never share your email."
/>

Error state

Please enter a valid email.

<Input
label="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.

PropTypeDefaultDescription
labelstringRenders FormLabel above the input.
requiredbooleanfalseAsterisk on label + native required.
helperTextstringHint shown below. Ignored when error is set.
errorstring | booleanError message (or just visual state).
leftSlotReactNode
rightSlotReactNode
variant'outline' | 'filled' | 'underlined''outline'
labelPropsPartial<FormLabelProps>Pass-through to internal FormLabel.