Components
Input
Single-line text input with label, helper text, error states, and leading/trailing slots.
Import
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Visible label (required for a11y unless aria-label is set) |
hint | string | — | Helper text below the input |
error | string | — | Error message (sets aria-invalid) |
prefix | React.ReactNode | — | Content rendered before the input (icon or text) |
suffix | React.ReactNode | — | Content rendered after the input (icon or text) |
className | string | — | Additional CSS classes on the wrapper |
...rest | InputHTMLAttributes | — | All native input attributes (type, placeholder, value, etc.) |
Controlled usage
With icons
Error state
When error is set:
aria-invalid="true"is added to the input- The error message is associated via
aria-describedby - Visual error styling is applied
Accessibility
labelrenders a<label>element associated viahtmlFor/idhintanderrorare associated viaaria-describedbyerroraddsaria-invalid="true"- All native input attributes are forwarded