Trevixal API
    Preparing search index...

    A minimal context menu for the tab strip and the workspace panel: a list of buttons under an anchor, with one level of submenus, closed by Escape, by choosing an item, or by pointing anywhere else.

    Written here rather than imported from @trevixal/ui so this package has no dependency beyond core.

    interface MenuItem {
        danger?: boolean;
        disabled?: boolean;
        id: string;
        items?: () => readonly MenuItem[];
        label: string;
        onSelect?: () => void;
        separatorBefore?: boolean;
    }
    Index
    danger?: boolean
    disabled?: boolean
    id: string

    Stable hook for tests and styling: rendered as data-menu-item.

    items?: () => readonly MenuItem[]

    Lazily built submenu; the item then opens it instead of selecting.

    label: string
    onSelect?: () => void
    separatorBefore?: boolean