Ark UI Logo
Undefined
Components
Listbox

Listbox

A component for selecting a single or multiple items from a list.

React
Solid
Svelte
Vue

Anatomy

To set up the Listbox correctly, you'll need to understand its anatomy and how we name its parts.

Each part includes a data-part attribute to help identify them in the DOM.

Examples

Basic

Here's a basic example of the Listbox component.

Controlled

The Listbox component can be controlled by using the value and onValueChange props. This allows you to manage the selected value externally.

Disabled Item

Listbox items can be disabled using the disabled prop on the collection item.

You can also use the isItemDisabled within the createListCollection to disable items based on a condition.

Multiple Selection

You can set the selectionMode property as multiple to allow the user to select multiple items at a time.

API Reference