Overview
Default
Focus
invalid-email
⚠ Enter a valid emailahmad.dani
✓ Username availableInstallation
Usage
Variants
Default
The standard input with a label above and optional placeholder.With Helper Text
••••••••
Must be at least 8 charactersRequired Field
Enter your full name
With Leading Icon
Search anything…
States
Default
DefaultFocused
FocusError value
⚠ Error messageValid value
✓ Looks goodDisabled
DisabledAvoid hiding inputs when they are unavailable. Use the
disabled prop so users can still see the field exists.API Reference
string
default:"text"
HTML input type. Values:
text · email · password · number · search · tel · urlstring
Label displayed above the input field.
string
Placeholder text shown when the field is empty.
string
Helper or error message displayed below the input.
string
default:"default"
Validation state. Values:
default · error · success · disabledReactNode
Icon rendered inside the input on the left side.
ReactNode
Icon rendered inside the input on the right side.
boolean
default:"false"
Marks the label with a required asterisk indicator.
boolean
default:"false"
Disables the input and applies the disabled visual style.
string
Controlled value of the input.
(e: ChangeEvent) => void
Change event handler.
string
Additional Tailwind classes for custom overrides.
Accessibility
- Input uses native
<input>element with semantic<label>association viaid/htmlFor - Error messages are linked via
aria-describedbyso screen readers announce them - Required fields use the
requiredHTML attribute in addition to the visual asterisk disabledinputs carry the nativedisabledattribute — they are excluded from tab order- Focus ring (
0 0 0 4px #CDE4F5) meets WCAG 2.1 AA contrast requirements
Do’s & Don’ts
Do
- Always provide a visible
label— never rely on placeholder alone - Use
helperTextto explain the expected format before the user submits - Use
state="error"with a descriptivehelperTextfor inline validation - Group related inputs inside a
Formcomponent for consistent spacing
Don't
- Don’t use placeholder text as a substitute for a label
- Don’t show error state until after the user has interacted with the field (avoid premature validation)
- Don’t use custom border colors outside the design system states
- Don’t disable inputs without explaining why — add a tooltip or helper text