A shadcn-style listbox component built with Ark UI primitives.

Framework
React
Vue
Svelte

Installation

npx shadcn@latest add @ark-cn/listbox

Usage

import * as Listbox from "@/components/ui/listbox"

Read exported parts in src/components/ui/listbox.tsx and compose the primitive according to the Ark UI pattern for this component.

Examples

Basic

Framework
React
Vue
Svelte

Controlled

Controlled
React
Vue
Svelte

value: vue

Root provider

useListbox + RootProvider
Option A
Option B

Disabled

Disabled item
Available
Unavailable
Available

Multiple

Multiple selection
Apple
Banana
Orange

Grouped

Grouped
React
Vue
Svelte
Node.js

Extended selection

Extended (Ctrl + click)
One
Two
Three
Four

Horizontal

Horizontal orientation
Sm
Md
Lg
Xl

Grid

Grid (3 columns)
Cell 1
Cell 2
Cell 3
Cell 4
Cell 5
Cell 6
Cell 7
Cell 8
Cell 9

Filtering

Filter
Apple
Banana
Orange
Grape
Strawberry
Mango
Pineapple
Kiwi
Peach
Pear

Select all

Fruits
Apple
Banana
Orange
Grape
Strawberry

Value text

Value text
React
Vue

Selected: None yet

API reference

This component mirrors the upstream Ark UI primitive.

See the ARK UI documentation for the full API.