Action menu

DarkInspect

The options behind every ⋯, and behind Share: one recipe, so no two menus drift. From lg it is a dropdown at the header menu's size: 224px wide, rows 12px over and under, 24px muted icons, a separator between groups. Below lg the same entries rise as a drawer of Link list's plain rows, hairlines between them and a chevron at each end.

A call site passes its entries in groups and its trigger (a ButtonMore most often), never a class. An entry is a press (onSelect) or a file to download (href); tone="destructive" paints Report, Block and Delete red, and disabled holds a row while its own save is in flight. showTitle shows the drawer's title where it says something ("Share item"); a ⋯'s stays for screen readers.

Anatomy

<ActionMenu
  groups={[
    [{ icon: IconStar, id: "star", label: "Star", onSelect: star }],
    [
      {
        icon: IconFlag,
        id: "report",
        label: "Report chat",
        onSelect: report,
        tone: "destructive",
      },
    ],
  ]}
  title="Conversation options"
  trigger={<ButtonMore label="Conversation options" />}
/>

In use: the listing form's ⋯, Share, a thread's ⋯, an inbox row's, a message's, the profile's, an address card's and an invitation's.

On this page