bit Bheadless

Listbox

Accessible custom select with single/multi-select, full keyboard navigation, and typeahead.

Implementation: CSS Tailwind

Basic Listbox

Click or use Space / Enter / arrow keys / typeahead.

Selected: (none)

Multi-select

Set Multiple="true". Use data-selected: for the check.

Selected:

Disabled Options

data-disabled: dims and skips disabled options.

Custom Option Content

Rich content per option; provide Label for typeahead.

Anchor Positioning

Anchor + --button-width for matched-width dropdowns.

Bottom Start (width matched)

Top Start (flips down if no space)

Selected: (none)

Form Submission

Set Name to render hidden inputs.

Large lists (virtualized)

Items + ItemTemplate + Virtualize="true" render only the visible options of 10,000 — give the panel a fixed height (h-64 overflow-y-auto) and each option exactly ItemSize px (h-9 = 36). A content-less BitBhListboxButton shows the selection or its Placeholder (data-placeholder:).

Selected: (none)
An unhandled error has occurred. Reload 🗙