Listbox
Keep options visible with keyboard navigation, search and multiple selection.
import { NeuListboxComponent } from '@neural-ui/core/listbox';Usage
Signal Forms
Value: โ ยท Valid: false
Try and configure
Events: 0 ยท
Generated template: reflects the settings above. Imports and state are in the Code tab.
<neu-listbox
(optionActivated)="record('optionActivated', $event)"
(filterChange)="onFilterChange($event)"
(dataRequest)="record('dataRequest', $event)"
(rangeChange)="record('rangeChange', $event)"
(focusEntered)="record('focusEntered', $event)"
(focusLeft)="record('focusLeft', $event)"
(touch)="record('touch', $event)"
(drop)="record('drop', $event)"
(valueChange)="record('valueChange', $event)"
[options]="destinations"
[(value)]="destination"
[searchable]="true"
[ariaFilterLabel]="'Search destinations'"
[checkbox]="true"
[emptyLabel]="'No destinations'"
[fluid]="true"
[label]="'Destination'"
[noResultsMessage]="'No matches'"
[searchPlaceholder]="'Search'"
/>Value and events
Accessibility and keyboard
API
Inputs
Configure the component with [property]="value". Your application supplies these values; the component does not replace the state you pass in.
Models
A model supports [(property)]="signal" or the [property] and (propertyChange) pair. Choose one form, not both.
Outputs
Listen to an event with (event)="handler($event)". The table explains the data your handler receives and how to use it.
Templates
ng-content projects content into the component. TemplateRef inputs receive a template; ng-template directives identify templates with a typed context. A directive shared by an entrypoint is not necessarily a slot of this component.
Each example demonstrates a different template. Switch between Demo and Code to inspect its implementation, imports and state.
Empty template
NeuListboxEmptyDirective
Open the control to see the empty state.
EmptyFilter template
NeuListboxEmptyFilterDirective
The template below replaces only its named region.
Filter template
NeuListboxFilterDirective
The template below replaces only its named region.
Group template
NeuListboxGroupDirective
The template below replaces only its named region.
Header template
NeuListboxHeaderDirective
The template below replaces only its named region.
Indicator template
NeuListboxIndicatorDirective
The template below replaces only its named region.
Item template
NeuListboxItemDirective
The template below replaces only its named region.
Loader template
NeuListboxLoaderDirective
The template below replaces only its named region.
Public methods
Public Types
Open a type to inspect its definition and interface fields.
Styles and tokens
Specific tokens
This component uses shared theme tokens rather than dedicated component hooks.
Shared tokens used
Override these on a local wrapper to affect this example. An override on :root affects other components that use the same token.