Select
A dropdown select component for choosing a single option from a predefined list of values.
Installation
npx chilli@latest add selectDefault
With Icons
Avatar
Borderless
API Reference
Select
| Prop | Type | Default | Description |
|---|---|---|---|
options | { value: string; label: string; icon?: ReactNode }[] | — | Array of options to display. |
value | string | — | Controlled selected value. |
onChange | (value: string) => void | — | Callback when the selected value changes. |
placeholder | string | "Select..." | Placeholder text when no option is selected. |
variant | "default" | "avatar" | "borderless" | "default" | Visual style of the trigger. |
size | "sm" | "md" | "md" | Size of the select trigger. |
avatarSrc | string | — | Avatar image source for the avatar variant. |