UI Headless Runtime API - v1.0.0
    Preparing search index...

    Interface ListboxOptions

    Listbox options for state ownership and keyboard behavior.

    interface ListboxOptions {
        defaultValue?: readonly string[];
        getValue?: () => readonly string[];
        id?: string;
        loop?: boolean;
        onValueChange?: (
            value: readonly string[],
            details: ChangeDetails<ListboxChangeReason>,
        ) => void;
        selectionMode?: ListboxSelectionMode;
        subscribeValue?: (listener: () => void) => Unsubscribe;
    }

    Hierarchy

    Index

    Properties

    defaultValue?: readonly string[]

    Initial value used only in uncontrolled mode.

    getValue?: () => readonly string[]

    Reads the consumer-owned value. Its presence enables controlled mode.

    id?: string

    Deterministic listbox ID.

    loop?: boolean

    Wraps Arrow navigation at collection edges.

    true

    onValueChange?: (
        value: readonly string[],
        details: ChangeDetails<ListboxChangeReason>,
    ) => void

    Receives every accepted value request and its typed cause.

    selectionMode?: ListboxSelectionMode

    Single or multiple selection.

    single

    subscribeValue?: (listener: () => void) => Unsubscribe

    Subscribes to consumer-owned value changes in controlled mode.