Build faster with Premium Chakra UI Components 💎

Learn more
Skip to Content
DocsPlaygroundGuidesBlog
Sponsor

Listbox

Used to display a list of options for selection.

SourceStorybookRecipeArk
React.js
Vue.js
Angular
Svelte

Usage

import { Listbox } from "@chakra-ui/react"
<Listbox.Root>
  <Listbox.Label />
  <Listbox.Content>
    <Listbox.Item>
      <Listbox.ItemText />
      <Listbox.ItemIndicator />
    </Listbox.Item>
  </Listbox.Content>
</Listbox.Root>

Examples

Controlled

Control the listbox value externally using the value and onValueChange props for custom state management.

React.js
Vue.js
Angular
Svelte
Selected: []

With Store

An alternative way to control the listbox is to use the RootProvider component and the useListbox store hook.

This way you can access the listbox state and methods from outside the listbox.

Use RootProvider + useListbox or Root, not both.

React.js
Vue.js
Angular
Svelte
Selected: []

Disabled Item

Disable specific items in the listbox to indicate unavailable options while keeping them visible for context.

React.js
Vue.js
Angular
Svelte
Next.js

Grouped

Use item groups to organize related options with clear section headers, making it easier for users to find specific categories of items.

Naruto
One Piece
Dragon Ball
The Shawshank Redemption
The Godfather
The Dark Knight

Horizontal

Display listbox items in a horizontal layout with card-based presentation, perfect for media galleries or visual selection interfaces.

Euphoric Echoes

Euphoric Echoes

Luna Solstice

Neon Dreamscape

Neon Dreamscape

Electra Skyline

Cosmic Serenade

Cosmic Serenade

Orion's Symphony

Melancholy Melodies

Melancholy Melodies

Violet Mistral

Rhythmic Illusions

Rhythmic Illusions

Mirage Beats

Multiple Selection

Enable users to select multiple items from the list, useful for scenarios like choosing tags, categories, or preferences.

React.js
Vue.js
Angular
Svelte
Next.js
Nuxt.js

Select All

Provide convenient "Select All" and "Select None" controls for multiple selection scenarios, with visual indicators showing selection state.

React.js
Vue.js
Angular
Svelte
Next.js
Nuxt.js
Remix
Gatsby
Ember.js
Preact

Extended Select

Use extended selection mode to allow users to select multiple items using keyboard shortcuts like Cmd/Ctrl for advanced selection patterns.

React.js
Vue.js
Angular
Svelte

With Checkmark

Display custom checkmarks for multiple selection scenarios, providing clear visual feedback for selected items.

React.js
Vue.js
Angular
Svelte
Next.js
Nuxt.js

With Icon

Add icons to listbox items to provide visual context and improve recognition of different options.

React.js
Vue.js
Angular
Svelte

With Description

Include additional descriptive text for each item to provide more context and help users make informed choices.

React.js

A JavaScript library for building user interfaces

Vue.js

The progressive JavaScript framework

Angular

Platform for building mobile and desktop web applications

Svelte

Cybernetically enhanced web apps

Next.js

The React framework for production

With Input

Combine a search input with the listbox to filter options dynamically, making it easy to find specific items in long lists.

React.js
Vue.js
Angular
Svelte
Next.js
Nuxt.js
Remix
Gatsby
Ember.js
Preact

With Popover

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

With Dialog

Present the listbox in a modal dialog for focused selection experiences, particularly useful for important choices that need user attention.

Virtualized

Handle large datasets efficiently with virtualization, rendering only visible items to maintain smooth scrolling performance even with thousands of items.

Image Explorer

Create an interactive gallery where the listbox acts as navigation for displaying different images or media content.

Mountain Landscape
Ocean Waves
Forest Path
City Skyline
Desert Dunes

Mountain Landscape

Mountain Landscape

Scenic mountain view

Transfer List

Create a dual-listbox interface for moving items between available and selected states, commonly used for permission management or item selection workflows.

Naruto
Sasuke
Sakura
Kakashi
Shisui
Itachi
Gaara
Rock Lee
Neji
Tenten
Hinata
Kiba
Shino
Choji
Ino
No items available

Props

Root

Label

Content

Item

ItemText

ItemIndicator

ItemGroup

ItemGroupLabel