Corpora UI
Atoms

Menu command

Command rows for a menu popup: icon · label · description · trailing status. MenuCommand wires a trigger to the popup; MenuCommandList uses the shared Command components for searchable, keyboard-accessible rows.

Usage

import { MenuCommand } from "@exegia/corpora-ui"

<MenuCommand
  items={[
    {
      id: "web",
      label: "Web search",
      description: "Real-time news",
      icon: <Globe />,
      trailing: "Connected",
    },
  ]}
  onSelect={run}
>
  <Button size="icon-lg" aria-label="Attach">
    +
  </Button>
</MenuCommand>

API reference

PropTypeDefaultDescription
items (required)IMenuCommandItem[]—{ id, label, description?, icon?, trailing?, href?, disabled?, onSelect? }.
onSelect(item) => void—Fires after the row's own onSelect.
side / alignPositioner side / align"top" / "start"MenuCommand only.

Last updated on

On this page