Components
ActionMenu
An overflow menu of actions behind a configurable trigger, for rows and toolbars.
ActionMenu is a domain-neutral overflow menu built on Dropdown. By default it
renders a MoreHorizontal icon trigger that opens a list of items, each with a
label, optional icon, shortcut, danger flag, and onClick/href. Use
sections instead of items for grouped, headed menus, and pass a custom
trigger to replace the default button. Reach for it whenever a set of actions
should fold behind one affordance.
Example
Preview
Q3 report.pdf
import { ActionMenu } from '@officina/ui';
import { Pencil, Trash } from 'lucide-react';
<ActionMenu
items={[
{ label: 'Edit', icon: <Pencil />, onClick: edit },
{ label: 'Delete', icon: <Trash />, danger: true, onClick: remove },
]}
/>;API
| Prop | Type | Default | Description |
|---|---|---|---|
| align | enum | end | Menu alignment relative to the trigger. Defaults to `'end'`. |
| icon | ReactNode | — | Icon for the default trigger button. Defaults to `MoreHorizontal`. |
| items | DropdownItem[] | — | Flat list of actions. Use `sections` instead for grouped/headed menus. |
| label | string | Actions | Accessible label for the default trigger. |
| sections | DropdownSection[] | — | Grouped actions with optional section headings. |
| size | enum | sm | Size of the default trigger button. |
| trigger | ReactNode | — | Replace the default overflow trigger entirely. |