Forms
Form input components
Form components for collecting user input.
Input
Text input with label, error, and hint support.
Usage
Sizes
With error
username is required
With hint
must be 8+ characters
With tooltip
Props
| prop | type | default | description |
|---|---|---|---|
| variant | "default" | "error" | "default" | Visual style |
| size | "sm" | "md" | "lg" | "md" | Input size |
| label | ReactNode | - | Accessible label |
| error | ReactNode | - | Error message |
| hint | ReactNode | - | Helper text |
| tooltip | ReactNode | - | Help text shown on hover |
Button
Interactive button with loading state.
Usage
Variants
Sizes
Loading
Props
| prop | type | default | description |
|---|---|---|---|
| variant | "default" | "primary" | "ghost" | "danger" | "default" | Visual style |
| size | "sm" | "md" | "lg" | "md" | Button size |
| loading | boolean | false | Show loading spinner |
Select
Dropdown select with keyboard navigation.
Usage
With label
With error
selection required
Disabled options
With tooltip
Props
| prop | type | default | description |
|---|---|---|---|
| options | SelectOption[] | required | List of options |
| value | string | - | Controlled value |
| defaultValue | string | "" | Uncontrolled default |
| onChange | (value: string) => void | - | Change callback |
| placeholder | string | "select..." | Placeholder text |
| disabled | boolean | false | Disable select |
| error | ReactNode | - | Error message |
| label | ReactNode | - | Accessible label |
| tooltip | ReactNode | - | Help text shown on hover |
SelectOption
| prop | type | default | description |
|---|---|---|---|
| value | string | required | Option value |
| label | string | required | Display text |
| disabled | boolean | false | Disable option |
Checkbox
Checkbox input with label and indeterminate state.
Usage
Sizes
With error
you must accept
Indeterminate
With tooltip
Props
| prop | type | default | description |
|---|---|---|---|
| label | ReactNode | - | Accessible label |
| size | "sm" | "md" | "lg" | "md" | Checkbox size |
| indeterminate | boolean | false | Show indeterminate state |
| error | ReactNode | - | Error message |
| tooltip | ReactNode | - | Help text shown on hover |
Switch
Toggle switch for boolean values.
Usage
Sizes
Disabled
With tooltip
Props
| prop | type | default | description |
|---|---|---|---|
| checked | boolean | false | Whether switch is on |
| onChange | (checked: boolean) => void | - | Toggle callback |
| size | "sm" | "md" | "lg" | "md" | Switch size |
| label | string | - | Accessible label |
| disabled | boolean | false | Disable switch |
| tooltip | ReactNode | - | Help text shown on hover |
Autofill
Search input with autocomplete suggestions.
Usage
With selection callback
Features
- Filters as you type
- Keyboard navigation with arrow keys
Enterto select highlighted itemEscapeto close suggestions- Closes on outside click
Props
| prop | type | default | description |
|---|---|---|---|
| items | AutofillItem[] | required | List of suggestions |
| placeholder | string | "search..." | Placeholder text |
| value | string | - | Controlled value |
| onChange | (value: string) => void | - | Input change callback |
| onSelect | (item: AutofillItem) => void | - | Selection callback |
AutofillItem
| prop | type | default | description |
|---|---|---|---|
| id | string | required | Unique identifier |
| label | string | required | Display text |
| value | string | - | Value when selected (defaults to label) |
Radio
Radio button group for selecting one option from a set.
Usage
Sizes
Horizontal
Disabled
RadioGroup props
| prop | type | default | description |
|---|---|---|---|
| value | string | - | Controlled value |
| defaultValue | string | - | Uncontrolled default |
| onChange | (value: string) => void | - | Change callback |
| name | string | - | Form field name |
| size | "sm" | "md" | "lg" | "md" | Radio size |
| label | string | - | Group label for accessibility |
| orientation | "horizontal" | "vertical" | "vertical" | Layout direction |
| disabled | boolean | false | Disable all radios |
Radio props
| prop | type | default | description |
|---|---|---|---|
| value | string | required | Unique value for this option |
| label | ReactNode | - | Accessible label |
| disabled | boolean | false | Disable this radio |
Textarea
Multi-line text input with autoresize and character count.
Usage
Sizes
With error
bio is required
With hint
keep it brief
Character count
0/280
Autoresize
With tooltip
Props
| prop | type | default | description |
|---|---|---|---|
| variant | "default" | "error" | "default" | Visual style |
| size | "sm" | "md" | "lg" | "md" | Textarea size |
| label | ReactNode | - | Accessible label |
| error | ReactNode | - | Error message |
| hint | ReactNode | - | Helper text |
| autoresize | boolean | false | Auto-resize based on content |
| maxLength | number | - | Maximum character count |
| showCount | boolean | false | Show character count |
| tooltip | ReactNode | - | Help text shown on hover |