Select
A flat dropdown select. Trigger shows the current value, content panel is a bordered white list with a lemon highlight on the focused item.
select-demo.app
Installation
terminal.sh
npx y2kui@latest add selectUsage
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";Props
Select
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Controlled selected value. |
defaultValue | string | — | Initial selected value (uncontrolled). |
onValueChange | (value: string) => void | — | Fired when the value changes. |
disabled | boolean | false | Disable the select. |
SelectTrigger
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional Tailwind classes (e.g. width). |
children | ReactNode | — | Must include a `SelectValue`. |