1. Docs
  2. Components
  3. List Box

List Box

A list of options and allows a user to select one or more of them.

Nirvana
Radiohead
Foo Fighters
Arctic Monkeys
The Strokes

Installation

Copy and paste the following code into your project.

Update the import paths to match your project setup.

Usage

Single import

import { ListBox } from "~/components/ui/list-box";
<ListBox.Root>
  {(item) => <ListBox.Item id={item.id}>{item.name}</ListBox.Item>}
</ListBox.Root>

Multiple imports

import { ListBoxItem, ListBoxRoot } from "~/components/ui/list-box";
<ListBoxRoot>
  {(item) => <ListBoxItem id={item.id}>{item.name}</ListBoxItem>}
</ListBoxRoot>

Examples

Multiple

Apple
Banana
Orange
Strawberry
Grapes
Mango
Pineapple

Details

AdminHas full access to all resources
EditorCan edit content but has limited access to settings
ViewerCan view content but cannot make changes
ContributorCan contribute content for review
GuestLimited access, mostly for viewing purposes

Section

Abbey Road
Sgt. Pepper's Lonely Hearts Club Band
Revolver
Led Zeppelin IV
Physical Graffiti
Houses of the Holy
Led Zeppelin II
The Dark Side of the Moon
The Wall
Wish You Were Here
Animals
Meddle
A Night at the Opera
News of the World
Sheer Heart Attack
The Game
Jazz
Queen II
Let It Bleed
Sticky Fingers
Exile on Main St.
Beggars Banquet
Some Girls
Tattoo You
Nevermind
In Utero
Bleach
The Doors
L.A. Woman
Strange Days
Morrison Hotel
OK Computer
Kid A
The Bends
In Rainbows
Back in Black
Highway to Hell
Let There Be Rock
Who's Next
Tommy
Quadrophenia
My Generation
The Who Sell Out