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

    Interface MenuOptions

    Menu engine configuration.

    interface MenuOptions {
        closeOnSelect?: boolean;
        defaultValue?: boolean;
        getValue?: () => boolean;
        id?: string;
        loop?: boolean;
        onValueChange?: (
            value: boolean,
            details: ChangeDetails<OpenChangeReason>,
        ) => void;
        positioning?: FloatingPositionOptions;
        subscribeValue?: (listener: () => void) => Unsubscribe;
    }

    Hierarchy

    Index

    Properties

    closeOnSelect?: boolean

    Whether item activation closes the menu.

    true

    defaultValue?: boolean

    Initial value used only in uncontrolled mode.

    getValue?: () => boolean

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

    id?: string

    Deterministic menu content ID.

    loop?: boolean

    Whether ArrowUp/ArrowDown wrap at collection edges.

    true

    onValueChange?: (
        value: boolean,
        details: ChangeDetails<OpenChangeReason>,
    ) => void

    Receives every accepted value request and its typed cause.

    Shared anchored positioning configuration.

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

    Subscribes to consumer-owned value changes in controlled mode.