Searchable Dropdown
A searchable dropdown component with support for groups, subgroups, and custom colors.
Preview
Installation
Usage
Examples
With Label
With Groups
With Subgroups
Keep Open On Select
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | - | The selected value |
onChange | (value: string) => void | - | Callback when value changes |
options | string[] | [] | Simple list of options |
groups | SearchableDropdownGroup[] | [] | Grouped options with optional subgroups |
placeholder | string | 'Select...' | Placeholder text |
label | string | - | Optional label for the dropdown |
optionColors | Record<string, string> | {} | Custom colors for specific options |
className | string | - | Additional CSS classes |
keepOpenOnSelect | boolean | false | Keep dropdown open after selection |