Select
Displays a list of options for the user to pick from.
Installation
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@sourceful-energy/ui"Usage
Examples
With Label
With Default Value
Disabled
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | - | The controlled value of the select. |
| defaultValue | string | - | The default value when uncontrolled. |
| onValueChange | (value: string) => void | - | Callback when the value changes. |
| disabled | boolean | false | Whether the select is disabled. |
| placeholder | string | - | Placeholder text when no value is selected. |
Accessibility
- Full keyboard navigation support
- WAI-ARIA compliant listbox pattern
- Supports screen readers
- Type-ahead search functionality