Skip to content

Listbox

Select a single or multiple items from a list.

Brazil
Mexico
Ireland

Installation

Anatomy

Usage

Controlled

Use value and onValueChange to control the listbox externally.

Selected the Large size

Small
Medium
Large
Extra Large

States

Disabled

Disable the entire listbox with the disabled prop.

Brazil
Mexico
Ireland

Orientation

Use orientation prop to change the orientation of the listbox.

Horizontal

Rappa Mundi

O Rappa

Acústico MTV

Charlie Brown Jr.

Thriller

Michael Jackson

The Eminem Show

Eminem

Selection Mode

Multiple

Set selectionMode="multiple" to allow selecting multiple items.

Brazil
Mexico
Ireland

Extended

Set selectionMode="extended" to select multiple items with Cmd/Ctrl modifier.

Hold or Ctrl to select multiple

Brazil
Mexico
Ireland

None

Set selectionMode="none" to disable selection.

New file
Create a new file
⌘N
Edit file
Make changes
⌘E
Delete file
Move to trash
⌘D

Examples

With Icon

🇧🇷
Brazil
🇲🇽
Mexico
🇮🇪
Ireland

With Description

Brazil
South America's country, Portuguese speaking.
Mexico
North America's country, Spanish speaking.
Ireland
Europe's country, Irish/English speaking.

Image Explorer

Mountain Landscape
Ocean Waves
Forest Path
City Skyline
Desert Dunes

Mountain Landscape

Scenic mountain view

Transfer List

Brazil
Ireland
Mexico

Grouping

Use groupBy in createListCollection and <ListboxItemGroup heading={}> with <ListboxItemGroupLabel> to group items.

Brazil
Colombia
Mexico
Canada

With Filter

Filter items using useListCollection with useFilter from @ark-ui/react. Call filter when the search input changes to filter items by label.

Brazil
Mexico
Ireland

With Popover

Use the listbox within a popover to create dropdown-like selection menus that overlay other content without taking up permanent screen space.

Grid Layout

Use createGridCollection with columnCount and grid CSS for a grid layout.

😀
😍
🥳
😎
🤩
😂
🥰
😊
🤗
😇
🔥
💯
🎉
❤️
👍
👏
🚀
🌈

API Reference

Listbox

Root component. Manages selection state and keyboard navigation.

ListboxContent

Holds the list of options.

ListboxItem

A single selectable list option.

ListboxItemText

Text content for a list item.

ListboxItemIndicator

Checkmark or icon shown when the item is selected.

ListboxItemGroup

Groups related options. Use heading or ListboxItemGroupLabel for a label.

ListboxItemGroupLabel

Label for a group. Must be used inside ListboxItemGroup.

ListboxValueText

Shows the selected value(s) as text. Use for custom trigger or display.

ListboxEmpty

Shown when the list has no items. Use for empty states.

ListboxShortcut

Optional keyboard shortcut hint shown next to an item.


For a complete list of props, see the Ark UI documentation.