Listbox
FormsA list of selectable items displayed inline. Use listbox when options should always be visible and users benefit from seeing all choices at once.
Import
import { Listbox, ListboxItem } from "@/components/ui/listbox";Usage
Single Selection
Standard listbox with single selection
Category
- In-Wall SpeakersWall-mounted speakers
- In-Ceiling SpeakersCeiling-mounted speakers
- Outdoor SpeakersWeather-resistant
Multiple Selection
Listbox allowing multiple selections
Select Features
- WiFi Connectivity
- Bluetooth
- AirPlay 2
- Chromecast Built-in
With Disabled Items
Listbox with some disabled options
Stock Status
- Available
- On Backorder
- Discontinued
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | string[] | — | Controlled selected value(s) |
defaultValue | string | string[] | — | Default selected value(s) (uncontrolled) |
onValueChange | (value: string | string[]) => void | — | Handler called when selection changes |
multiple | boolean | false | Allow multiple selections |
label | string | — | Label text displayed above the listbox |