Input
A text input component for forms and user data entry with built-in styling and accessibility features.
Examples
Text input
Default (static label)
Preview
Floating label
Preview
Helper text, disabled, and invalid
Preview
Optional
Disabled state
With icons
Preview
Medium size (md)
Preview
Medium size with helper text, disabled, and invalid
Preview
Optional
Disabled state
Number input
Default (static label)
Preview
Floating label
Preview
Helper text, disabled, and invalid
Preview
With icons
Preview
Medium size
Preview
Password input
Preview
With helper text
Preview
Invalid password
Preview
API
Input
Text input element.
| Property | Type | Default | Description |
|---|---|---|---|
| type | ”text” | “email” | “numeric” | “password" | "text” | Input variant. “email” shows a default Mail icon on the left. For “text” and “email”, setting invalid shows a warning triangle icon on the right. “numeric” renders a number input with stepper buttons. “password” renders a password field with lock icon and show/hide toggle. |
| size | ”md” | “lg" | "lg” | Input height and icon/label scale. “md” uses 40px height, 20px icons, 14px placeholder label, and smaller numeric steppers. |
| min | number | - | When type is numeric, sets the minimum allowed value. Standard HTML attribute. |
| iconLeft | React.ReactElement | - | Icon or element at the start of the input. For type “numeric”, only the left slot is used (steppers are on the right). |
| iconRight | React.ReactElement | - | Icon or element at the end of the input. Not used for type “numeric” or “password”. For type “text” and “email”, when invalid is true the built-in warning icon replaces any custom iconRight. |
| disabled | boolean | false | Disables the input and steppers (numeric). Standard HTML attribute. |
| invalid | boolean | false | When true, enables error state styling. For type “text” and “email”, this also shows a warning triangle icon on the right. |
InputWrapper
Layout wrapper for the input and related elements (label/helper text).
| Property | Type | Default | Description |
|---|---|---|---|
| className | string | - | Additional CSS classes to apply to the wrapper. |
InputField
Relative wrapper for InputLabel + Input. Use when combining a floating label with InputText so the label stays vertically centered.
| Property | Type | Default | Description |
|---|---|---|---|
| className | string | - | Additional CSS classes to apply to the field container. |
InputLabel
Floating label (like Select’s SelectLabel). Use inside InputWrapper; with InputText, wrap label and input in InputField. Use a placeholder with the same text as the label (e.g. placeholder="Email").
| Property | Type | Default | Description |
|---|---|---|---|
| htmlFor | string | - | Associates the label with the input id. |
InputText
Helper or validation text below the input. Accepts standard HTML attributes for a span (e.g. className).
| Property | Type | Default | Description |
|---|---|---|---|
| invalid | boolean | false | When true, uses error colors for the text. |
| className | string | - | Additional CSS classes. |
Last updated on