Forms/Select
Select
Accessible dropdown select with optional search, clearable selection, and keyboard navigation. A drop-in replacement for the native select element with full styling control.
import { Select } from "@animui/ui"Basic usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
options | Array<{ value: string; label: string; disabled?: boolean }> | — | Array of selectable options. |
value | string | — | Controlled selected value. |
onChange | (value: string) => void | — | Called when selection changes. |
label | string | — | Label rendered above the select trigger. |
placeholder | string | "Select..." | Placeholder text shown when no option is selected. |
searchable | boolean | false | Adds a search input to filter options. |
clearable | boolean | false | Adds a clear button to reset the selection. |
disabled | boolean | false | Disables the select. |
error | string | — | Error message shown below the select. |
className | string | — | Additional classes on the wrapper. |