{
  "$schema": "https://rift-ds.com/schema/component.schema.json",
  "version": "1.40.0",
  "kind": "component",
  "name": "Menubar",
  "label": "Menu bar",
  "slug": "menubar",
  "category": "navigation",
  "description": "A persistent row of menus, like an app's File, Edit and View, with arrow keys along the bar.",
  "client": true,
  "importPath": "rift-ds/components/Menubar/Menubar",
  "barrel": "main",
  "docsUrl": "https://rift-ds.com/components/menubar",
  "markdownUrl": "https://rift-ds.com/components/menubar.md",
  "exports": [
    {
      "component": "Menubar",
      "props": [
        {
          "name": "menus",
          "type": "MenubarMenu[]",
          "typeKind": "array",
          "required": true,
          "description": "The menus, in order along the bar.",
          "typeRefs": [
            "MenubarMenu"
          ]
        },
        {
          "name": "label",
          "type": "string",
          "typeKind": "primitive",
          "required": false,
          "description": "Accessible name for the bar.",
          "default": "Menu bar"
        },
        {
          "name": "size",
          "type": "\"default\" | \"compact\"",
          "typeKind": "enum",
          "values": [
            "compact",
            "default"
          ],
          "required": false,
          "description": "Trigger and menu size.",
          "default": "default"
        },
        {
          "name": "keyLabels",
          "type": "Partial<Record<string, string>>",
          "typeKind": "reference",
          "required": false,
          "description": "Key names for the shortcut hints in every menu, for a keyboard other than English (passed to each DropdownMenu).",
          "typeRefs": [
            "ShortcutKeyLabels"
          ]
        },
        {
          "name": "className",
          "type": "string",
          "typeKind": "primitive",
          "required": false,
          "description": "Additional CSS classes",
          "default": ""
        }
      ]
    }
  ],
  "types": {
    "DropdownMenuEntry": {
      "kind": "component-props",
      "component": "DropdownMenu",
      "see": "get_component(\"DropdownMenu\")"
    },
    "MenubarMenu": {
      "kind": "interface",
      "definition": "interface MenubarMenu {\n  /** The trigger's text, e.g. \"File\". Also the open menu's accessible name. */\n  label: string;\n  /** The menu's entries, in DropdownMenu's shape: items, groups, separators, checkbox and radio items, sub-menus and shortcuts. */\n  items: DropdownMenuEntry[];\n  /** Show the trigger but do not let it open. */\n  disabled?: boolean;\n  /** Stable identity for the menu, when two menus share a label. Defaults to the label. */\n  id?: string;\n}",
      "description": "One menu in the bar: its trigger's label and the entries it opens.",
      "refs": [
        "DropdownMenuEntry"
      ]
    },
    "ShortcutKeyLabels": {
      "kind": "type",
      "definition": "type ShortcutKeyLabels = Partial<Record<string, string>>;",
      "description": "The legends a shortcut is drawn with, by modifier or key name. Merged over the platform's defaults."
    }
  },
  "externalTypes": {
    "Partial": "typescript",
    "Record": "typescript"
  },
  "keyboard": [
    {
      "pattern": "menubar",
      "label": "Menu bar",
      "apg": "https://www.w3.org/WAI/ARIA/apg/patterns/menubar/",
      "rows": [
        {
          "keys": [
            "Tab"
          ],
          "text": "Moves focus into the bar at the last menu it was on, and out of the bar on the next press."
        },
        {
          "keys": [
            "ArrowRight"
          ],
          "text": "Moves to the next menu, opening it if a menu is open.",
          "inline": true
        },
        {
          "keys": [
            "ArrowLeft"
          ],
          "text": "Moves to the previous menu, opening it if a menu is open.",
          "inline": true
        },
        {
          "keys": [
            "End"
          ],
          "text": "Moves to the last menu."
        },
        {
          "keys": [
            "Home"
          ],
          "text": "Moves to the first menu."
        },
        {
          "keys": [
            "ArrowDown"
          ],
          "text": "Opens the menu and moves into it; the menu's own keys then apply."
        },
        {
          "keys": [
            "Escape"
          ],
          "text": "Closes the open menu and returns focus to its name in the bar."
        }
      ]
    }
  ],
  "size": {
    "gzip": 9662
  },
  "alternatives": [
    {
      "name": "Toolbar",
      "when": "the bar holds controls that act at once rather than menus",
      "schemaUrl": "https://rift-ds.com/schema/components/toolbar.json"
    },
    {
      "name": "DropdownMenu",
      "when": "one menu opens from one trigger",
      "schemaUrl": "https://rift-ds.com/schema/components/dropdown-menu.json"
    }
  ]
}
