{
  "id": "command-menu",
  "name": "CommandMenu",
  "level": "organism",
  "status": "stable",
  "purpose": "Finds and runs anything from the keyboard (⌘K).",
  "description": "⌘K command palette. Composes Dialog (modal overlay + focus trap) + cmdk Command (filtered listbox + keyboard navigation + active descendant). Item rendering is consumer-owned via children — typically a tree of CommandMenu.Group + CommandMenu.Item + CommandMenu.Separator. cmdk handles filtering automatically based on the search input; the organism never owns search state.",
  "role": "navigation",
  "import": "@rrios-forge/ui/organisms/command-menu",
  "exports": [
    "CommandMenu",
    "CommandMenuGroup",
    "CommandMenuItem",
    "CommandMenuSeparator",
    "COMMAND_MENU_CONTENT_CLASSNAME",
    "COMMAND_MENU_ITEM_INTENTS",
    "COMMAND_MENU_ITEM_TONES",
    "COMMAND_MENU_PRESENTATIONS",
    "commandMenuFooterVariants",
    "commandMenuGroupVariants",
    "commandMenuInputFieldVariants",
    "commandMenuInlineVariants",
    "commandMenuInputVariants",
    "commandMenuItemVariants",
    "commandMenuListVariants",
    "commandMenuListViewportVariants",
    "commandMenuRootVariants",
    "commandMenuSeparatorVariants"
  ],
  "source": "packages/ui/src/organisms/command-menu",
  "axes": [
    {
      "axis": "tone",
      "part": null,
      "values": [
        "neutral",
        "muted"
      ],
      "default": "neutral",
      "meaning": "Which semantic colour family the element speaks in."
    },
    {
      "axis": "intent",
      "part": null,
      "values": [
        "neutral",
        "danger"
      ],
      "default": "neutral",
      "meaning": "What an action does."
    }
  ],
  "needs": [
    {
      "need": "App frame / navigation",
      "answer": "**The rail that peeks (ADR-044) — the default and the recommendation.** `PageShell` (defaults: `sidebarMode=\"rail\"`, `sidebarPresentation=\"inset\"`, `mobileNav=\"tabs\"`) + `SidebarSection aria-label` + ONE untitled `NavGroup`: home, search, the rooms, settings — same size, same gap. Wrap every `NavItem` in `PageShell.RailPeek` and compose its panel with `PageShell.PeekHeader` / `PeekFacts` / `PeekLinks`. Search is a button row opening `CommandMenu` (⌘K); settings' peek holds the quick controls; phones get `PageShell.MobileTabBar` (≤ 5). No `TopBar` in an app frame. Opt-ins only when a product needs them: the labelled panel (`sidebarMode=\"auto\"`, ⌘\\\\ collapse, ADR-040), `island`/`column` (ADR-025), the bubble (`mobileNav=\"bubble\"`)"
    },
    {
      "need": "Command palette",
      "answer": "`CommandMenu`"
    }
  ],
  "patterns": [],
  "a11yExceptions": [],
  "decisions": [
    {
      "id": "ADR-003",
      "title": "Storybook editorial convention and pattern↔component bidirectionality"
    },
    {
      "id": "ADR-009",
      "title": "Editorial Frame: PageShell v3 + new `TopBar` molecule"
    },
    {
      "id": "ADR-010",
      "title": "PageShell v4: bottom dock + mobile floating bubble"
    },
    {
      "id": "ADR-030",
      "title": "Axis vocabulary: one name, one meaning"
    },
    {
      "id": "ADR-034",
      "title": "Accessible names come from a labels provider"
    },
    {
      "id": "ADR-035",
      "title": "Motion grammar: the gate before motion, slop by repetition, and what reduced motion keeps"
    },
    {
      "id": "ADR-044",
      "title": "Navigation is a rail that peeks"
    }
  ],
  "stories": [
    {
      "name": "Playground",
      "id": "components-organisms-commandmenu--playground",
      "interaction": false,
      "snapshots": [],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-commandmenu--playground",
      "frame": "/iframe.html?id=components-organisms-commandmenu--playground&viewMode=story"
    },
    {
      "name": "Open (inline)",
      "id": "components-organisms-commandmenu--open",
      "interaction": false,
      "snapshots": [
        "dark",
        "high-contrast",
        "light"
      ],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-commandmenu--open",
      "frame": "/iframe.html?id=components-organisms-commandmenu--open&viewMode=story"
    },
    {
      "name": "With trigger",
      "id": "components-organisms-commandmenu--with-trigger",
      "interaction": false,
      "snapshots": [
        "dark",
        "light"
      ],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-commandmenu--with-trigger",
      "frame": "/iframe.html?id=components-organisms-commandmenu--with-trigger&viewMode=story"
    },
    {
      "name": "Empty (no matches)",
      "id": "components-organisms-commandmenu--empty",
      "interaction": false,
      "snapshots": [],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-commandmenu--empty",
      "frame": "/iframe.html?id=components-organisms-commandmenu--empty&viewMode=story"
    },
    {
      "name": "Custom empty",
      "id": "components-organisms-commandmenu--custom-empty",
      "interaction": false,
      "snapshots": [],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-commandmenu--custom-empty",
      "frame": "/iframe.html?id=components-organisms-commandmenu--custom-empty&viewMode=story"
    },
    {
      "name": "No footer",
      "id": "components-organisms-commandmenu--no-footer",
      "interaction": false,
      "snapshots": [],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-commandmenu--no-footer",
      "frame": "/iframe.html?id=components-organisms-commandmenu--no-footer&viewMode=story"
    },
    {
      "name": "Single group",
      "id": "components-organisms-commandmenu--single-group",
      "interaction": false,
      "snapshots": [],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-commandmenu--single-group",
      "frame": "/iframe.html?id=components-organisms-commandmenu--single-group&viewMode=story"
    },
    {
      "name": "In PageShell (⌘K trigger)",
      "id": "components-organisms-commandmenu--in-page-shell",
      "interaction": false,
      "snapshots": [
        "dark",
        "light"
      ],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-commandmenu--in-page-shell",
      "frame": "/iframe.html?id=components-organisms-commandmenu--in-page-shell&viewMode=story"
    },
    {
      "name": "Accessibility",
      "id": "components-organisms-commandmenu--accessibility",
      "interaction": false,
      "snapshots": [],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-commandmenu--accessibility",
      "frame": "/iframe.html?id=components-organisms-commandmenu--accessibility&viewMode=story"
    }
  ],
  "storyFile": "tooling/storybook/stories/components/organisms/command-menu.stories.tsx"
}
