Select
Composable typed single and multiple selection with SDK keyboard and form behavior.
Installation
npx shadcn@latest add @navui/selectUsage
Provide items and render the matching options. Install NavUI Field to use the example’s visible label. Set size on SelectTrigger to match neighboring controls.
Examples
Report export options
Choose a workspace and multiple export formats. Reset restores the original selection. This example uses NavUI Field and Button.
API reference
Foundation component styled on UI SDK Select. See the UI SDK Select documentation for the complete inherited API.
| Prop | Type | Default | Description |
|---|---|---|---|
size | "xs" | "sm" | "default" | "lg" | "default" | Set on SelectTrigger to match Button and Input at 24, 28, 32, or 40 pixels. |
Accessibility
- Use a visible associated label. Field wires labels, descriptions and visible errors without manual IDs.
- Validation policy belongs to the consuming form. Reset is native; controlled controls reset their state in the consuming form.
- Styles use neutral semantic tokens. Motion is CSS only and gated by prefers-reduced-motion.