<ui-listbox>

Keyed, filterable list with keyboard navigation and a custom item template.

Lists · stable · since 2.0.0 · extends _UIElement

Examples

<ui-listbox id="lb1" filterable></ui-listbox><script>document.getElementById("lb1").setItems([{id:"a",label:"Alpha"},{id:"b",label:"Beta"}])</script>
<ui-listbox id="lb2" numbered></ui-listbox><script>document.getElementById("lb2").setItems([{id:"1",label:"One"},{id:"2",label:"Two"}])</script>

Playground

Generated HTML

Event log

    API

    Attributes and properties

    PropertyAttributeTypeDefaultDescription
    disableddisabledbooleanfalse
    busydata-ui-busybooleanfalse
    filterablefilterablebooleanfalseShow a filter input.
    numberednumberedbooleanfalseNumber the items.
    hotkeyshotkeysbooleanfalseDigits 1–9 select the n-th item.
    emptyTextempty-textstring"No items"Text when nothing matches.
    valuevaluestring""Selected item key.

    Methods

    Events

    Slots

    None.