Select
Single-value dropdown with arrow-key navigation, typeahead, and subtle open/close animation.
Installation
npx dafink-ui add selectDemo
The framework your project uses.
This field is required.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| options | SelectOption[] | - | Array of { value, label } objects. |
| value | string | undefined | Controlled selected value. |
| onChange | (value: string) => void | undefined | Called when a selection is made. |
| placeholder | string | 'Select…' | Shown when no value is selected. |
| label | string | undefined | Visible label above the trigger. |
| hint | string | undefined | Helper text (hidden when error is set). |
| error | string | undefined | Error message; switches trigger to error state. |
| size | 'sm' | 'md' | 'md' | Trigger height and text size. |
| disabled | boolean | false | Prevents interaction. |
| className | string | '' | Additional classes on the root wrapper. |