Skip to Content
Selection & Dates@hacline/ui/listbox

Listbox

Select one or multiple options from an always-visible list.

Usage

Click or use the arrow keys and Space to select notification channels. This example uses multiple, so the currently selected values are stored in an array.

Email digest
In-app notifications
Desktop push
1 channel selected

Rendering Grouped Data Options

Pass grouped objects into items. The listbox generates keyboard-navigable structure using the group labels and option labels.

Engineering
Code review
Build artifacts
Documentation
Getting started

Parts

PartDescription
ListboxGroup
A group of items, named by its ListboxGroupLabel.
ListboxGroupLabel
The group's heading, which names the group.
ListboxItem
An option. Pressing it selects it, or toggles it with multiple.
ListboxItemIcon
An icon inside an item. Screen readers and typeahead skip it, and mirror flips it in right-to-left text.
ListboxItemIndicator
The check inside a selected item. Rendered while it's selected, or always with keepMounted.
ListboxItems
Renders data items. Used by data listboxes, and available for custom layouts.
ListboxSeparator
A line between items or groups, hidden from screen readers.

Props

Prop

Type

View parts and state attributes in UI SDK.