ListBox overview
TailNG ships <tng-listbox> as the owned always-open selection surface. It keeps the listbox primitive keyboard contract, but component-driven apps can now hand options in as data instead of authoring every option node manually.
Imports
Component import
ts
import { TngListboxComponent } from '@tailng-ui/components';
Usage baseline
Wrapper usage
html
<tng-listbox
ariaLabel="Capability checklist"
[multiple]="true"
[options]="capabilityOptions"
[value]="selectedCapabilities()"
(valueChange)="onSelectedCapabilitiesChange($event)"
></tng-listbox>
Style variants
The same <tng-listbox> contract can sit inside a plain CSS shell or a Tailwind shell without changing the API.
Capability checklist (Plain-CSS)
selected: Components integration
Capability checklist (Tailwind CSS)
selected: Styling contracts
Behavior baseline
- Arrow keys drive active option roving inside the focused listbox.
Spacetoggles active selection andEntercommits selection.- Typeahead is enabled by default for printable keys.
- Common option shapes like
id/label/descriptionwork without custom accessors.