blessed-components - v1.20.0
    Preparing search index...

    Interface MenuBarData<TItem>

    Stateful data accepted by the Blessed menuBar adapter.

    interface MenuBarData<TItem extends MenuBarItem = MenuBarItem> {
        activeId?: string;
        characters?: MenuBarCharacters;
        defaultValue?: string;
        emptyText?: string;
        items: readonly TItem[];
        onActivate?: (value: string) => void;
        onActiveIdChange?: (activeId: string) => void;
        separator?: string;
        value?: string;
    }

    Type Parameters

    Index

    Properties

    activeId?: string

    Preferred initial focus identifier.

    characters?: MenuBarCharacters

    Character tokens used by the pure renderer.

    defaultValue?: string

    Initial active/open menu for uncontrolled usage. Ignored when value is supplied.

    emptyText?: string

    Text displayed when no menus exist.

    items: readonly TItem[]

    Ordered top-level menus. Disabled menus are visible but not interactive.

    onActivate?: (value: string) => void

    Called when Enter, Space, click, or MenuBarHandle.activateFocused requests activation.

    onActiveIdChange?: (activeId: string) => void

    Called after focus moves to a different enabled menu.

    separator?: string

    Text inserted between rendered menus.

    value?: string

    Controlled active/open menu identifier.