<ListBox aria-label="Framework">
<ListBoxItem>Next.js</ListBoxItem>
<ListBoxItem>Remix</ListBoxItem>
<ListBoxItem>Astro</ListBoxItem>
<ListBoxItem>Gatsby</ListBoxItem>
</ListBox>npx shadcn@latest add @dotui/list-boxUse list boxes to display a list of options and allow users to select one or more of them.
import { ListBox, ListBoxItem } from "@/components/ui/list-box";<ListBox aria-label="Options" selectionMode="single">
<ListBoxItem>Option 1</ListBoxItem>
<ListBoxItem>Option 2</ListBoxItem>
<ListBoxItem>Option 3</ListBoxItem>
</ListBox>Use the controls below to experiment with different list box props and see the live preview and code update.
The type of selection that is allowed in the collection.
SelectionModeThe primary orientation of the items. Usually this is the direction that the collection scrolls.
Orientation<ListBox
aria-label="Options"
selectionMode="single"
orientation="vertical"
>
<ListBoxItem id="1">Option 1</ListBoxItem>
<ListBoxItem id="2">Option 2</ListBoxItem>
<ListBoxItem id="3">Option 3</ListBoxItem>
<ListBoxItem id="4">Option 4</ListBoxItem>
</ListBox>A listbox displays a list of options and allows a user to select one or more of them.
| Prop | Type | Default | |
|---|---|---|---|
boolean | — | ||
DragAndDropHooks<NoInfer<T>> | — | ||
"grid" | "stack" | 'stack' | ||
Orientation | 'vertical' | ||
ReactNode | function | — | ||
Iterable<T> | — | ||
ReactNode | function | — | ||
readonly any[] | — | ||
SelectionMode | — | ||
SelectionBehavior | "toggle" | ||
Iterable<Key> | "all" | — | ||
Iterable<Key> | "all" | — | ||
function | — | ||
Iterable<Key> | — | ||
boolean | — | ||
boolean | — | ||
boolean | — | ||
boolean | — | ||
"none" | "clearSelection" | 'clearSelection' | ||
A ListBoxItem represents an individual option in a ListBox.
| Prop | Type | Default | |
|---|---|---|---|
union | 'default' | ||
Key | — | ||
T | — | ||
string | — | ||
boolean | — | ||
ReactNode | function | — | ||
Last updated on 1/13/2026
Bringing singularity to the web.
Built with passion by @mehdibha.