A selectable option in an ngListbox.
API
class Option<V> { readonly element: HTMLElement; active: Signal<any>; readonly @Input() id: InputSignal<any>; protected searchTerm: Signal<string>; @Input() value: InputSignal<V>; @Input() disabled: InputSignalWithTransform<boolean, unknown>; @Input() label: InputSignal<string | undefined>; readonly selected: Signal<any>;}
element
HTMLElementA reference to the host element.
active
Signal<any>Whether the option is currently active (focused).
id
InputSignal<any>A unique identifier for the option.
searchTerm
Signal<string>The text used by the typeahead search.
value
InputSignal<V>The value of the option.
disabled
InputSignalWithTransform<boolean, unknown>Whether an item is disabled.
label
InputSignal<string | undefined>The text used by the typeahead search.
selected
Signal<any>Whether the option is selected.
Description
A selectable option in an ngListbox.
This directive should be applied to an element (e.g., <li>, <div>) within an
ngListbox. The value input is used to identify the option, and the label input provides
the accessible name for the option.
<li ngOption value="item-id" label="Item Name"> Item Name</li>
Jump to details