ListBox
A scrollable list component for single or multi-item selection. Supports search, grouping, disabled items, and custom item templates.
Single Selection
Basic single select
Click an item to select it.
const [value, setValue] = useState<string>();
<ListBox
options={frameworkOptions}
value={value}
onChange={(v) => setValue(v as string)}
/>Multiple Selection
Multi-select with select-all
Select multiple items. Shift-click or use the Select All checkbox.
const [values, setValues] = useState<string[]>([]);
<ListBox
options={options}
value={values}
onChange={(v) => setValues(v as string[])}
multiple
selectAll
clearable
/>Searchable
With search filter
Type to filter the list in real time.
<ListBox
options={options}
value={value}
onChange={setValue}
searchable
searchPlaceholder="Search frameworks..."
/>Grouped Options
Group by category
Items grouped by their category with sticky group headers.
<ListBox
options={options}
value={values}
onChange={(v) => setValues(v as string[])}
multiple
grouped
groupBy={(opt) => opt.metadata?.category ?? 'Other'}
maxHeight={280}
/>Disabled State
Fully disabled
The entire list is non-interactive when disabled is true.
<ListBox options={options} value={value} disabled />API Reference
optionsreqListBoxOption[]Array of options to display.
optionsreqListBoxOption[]Array of options to display.
valueT | T[]Currently selected value or array of values (for multiple selection).
valueT | T[]Currently selected value or array of values (for multiple selection).
onChange(value: T | T[]) => voidCalled when selection changes.
onChange(value: T | T[]) => voidCalled when selection changes.
multipleboolean"false"Allow selecting multiple items.
multipleboolean"false"Allow selecting multiple items.
searchableboolean"false"Show a search input above the list.
searchableboolean"false"Show a search input above the list.
searchPlaceholderstringPlaceholder text for the search input.
searchPlaceholderstringPlaceholder text for the search input.
groupedboolean"false"Group items using the groupBy function.
groupedboolean"false"Group items using the groupBy function.
groupBy(option: ListBoxOption) => stringReturns the group name for each option.
groupBy(option: ListBoxOption) => stringReturns the group name for each option.
selectAllboolean"false"Show a Select All checkbox (requires multiple).
selectAllboolean"false"Show a Select All checkbox (requires multiple).
clearableboolean"false"Show a Clear All button.
clearableboolean"false"Show a Clear All button.
disabledboolean"false"Disable all interactions.
disabledboolean"false"Disable all interactions.
emptyMessagestringMessage shown when the option list is empty.
emptyMessagestringMessage shown when the option list is empty.
maxHeightstring | numberMax height of the scrollable list.
maxHeightstring | numberMax height of the scrollable list.
itemTemplate(option: ListBoxOption) => ReactNodeCustom renderer for each option item.
itemTemplate(option: ListBoxOption) => ReactNodeCustom renderer for each option item.
compareFn(a: T, b: T) => booleanCustom equality comparator for option values. Defaults to deep-equal (JSON-stringify based) for objects.
compareFn(a: T, b: T) => booleanCustom equality comparator for option values. Defaults to deep-equal (JSON-stringify based) for objects.
ariaLabelstringAccessible label for the listbox.
ariaLabelstringAccessible label for the listbox.
ariaLabelledBystringID of the element that labels the listbox.
ariaLabelledBystringID of the element that labels the listbox.
Features
Single & Multi Select
Supports both single value and multi-value selection modes
Search Filter
Built-in search input filters options in real time without extra code
Grouping
Group options by any property with sticky group headers
Select All & Clear
Optional Select All checkbox and Clear button for bulk operations
Disabled Items
Individual options can be marked as disabled while the list remains interactive
Custom Templates
itemTemplate prop renders any React node for fully custom option display
Accessibility
Keyboard navigation, ARIA roles, and focus management built in
Theming
Full dark/light + 5 brand themes via CSS variables — zero extra config