Components
RowActions
Row action cluster that shows the first few inline and folds the rest into a menu.
RowActions is a compact action cluster for table rows and list items. It shows
the first max actions (default 3) as inline icon buttons — each with a tooltip
from its label — and collapses any overflow into an ActionMenu. Each action
takes an icon, plus onClick or href, and can be flagged danger or
disabled. It is domain-neutral and never imports table primitives.
Example
Preview
Ada Lovelace
import { RowActions } from '@officina/ui';
import { Eye, Pencil, Copy, Trash } from 'lucide-react';
<RowActions
max={2}
actions={[
{ label: 'View', icon: <Eye />, onClick: view },
{ label: 'Edit', icon: <Pencil />, onClick: edit },
{ label: 'Duplicate', icon: <Copy />, onClick: duplicate },
{ label: 'Delete', icon: <Trash />, danger: true, onClick: remove },
]}
/>;API
| Prop | Type | Default | Description |
|---|---|---|---|
| actions* | RowAction[] | — | Row actions; the first `max` show inline, the rest fold into a menu. |
| max | number | 3 | Number of actions shown inline before collapsing the rest into a menu. |
| menuLabel | string | More actions | Accessible label for the overflow menu trigger. |
| size | enum | sm | Size of the action buttons. Defaults to `'md'`. |