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
Disabled| State | Border | Ring | Helper text color |
|---|---|---|---|
| Default | #D0D5DD | — | #667085 |
| Focus | #0479CE | #CDE4F5 4px | — |
| Error | #DC2626 | — | #B42318 |
| Success | #039855 | — | #027A48 |
| Disabled | #E5E7EB | — | — |
Avoid hiding inputs when they are unavailable. Use the
disabled prop so users can still see the field exists.API Reference
HTML input type. Values:
text · email · password · number · search · tel · urlLabel displayed above the input field.
Placeholder text shown when the field is empty.
Helper or error message displayed below the input.
Validation state. Values:
default · error · success · disabledIcon rendered inside the input on the left side.
Icon rendered inside the input on the right side.
Marks the label with a required asterisk indicator.
Disables the input and applies the disabled visual style.
Controlled value of the input.
Change event handler.
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