GitHubGitHub
← All components
Actions / component

Row actions menu

One ellipsis trigger per table row listing every action by name, with hover intent, a danger separator, and busy and flash states for work that outlives the closed menu.

DefaultBusyFlashDanger
Services
Unit
Requests/s
Response timems
CPU load%

Open a row menu — only one stays open

<RowActionsMenu items={[  { key: 'view', icon: 'eye', label: 'View details', onclick: () => open(row) },  { key: 'delete', icon: 'trash', label: 'Delete', onclick: () => remove(row), danger: true }]} />

Installation

pnpm add @chanrg/4ui

Import the stylesheet once, at the root of your app:

import '@chanrg/4ui/styles.css';

Usage

import { RowActionsMenu } from '@chanrg/4ui';<RowActionsMenu items={[  { key: 'view', icon: 'eye', label: 'View details', onclick: () => open(row) },  { key: 'delete', icon: 'trash', label: 'Delete', onclick: () => remove(row), danger: true }]} />

Busy

Set busy while row work runs — the menu has already closed, so the trigger reports progress.

worker-07

The trigger keeps reporting progress after the menu has closed

<RowActionsMenu {items} busy />

Flash

Set flash after an action resolves to tint the trigger green or red.

api-gateway

flash="success" tints the trigger once, then settles

<RowActionsMenu {items} flash="success" />

API reference

Props

PropTypeDefaultDescription
itemsArray<RowAction | false | null>[]Falsy entries are ignored, so call sites can inline `cond && {…}`.
item.key / label / iconstringStable key (the list is keyed), visible text, optional glyph.
item.danger / disabled / hidden / titleboolean / stringfalseRed text plus a divider, gating, removal, and a reason tooltip.
busy / flashboolean / 'success' | 'error'false / nullTrigger spinner and post-action tint — the row reports back after the menu has closed.
hoverbooleantrueHover-to-open; turn off for costly actions.

CSS variables

VariableDescription
--4ui-surfacePrimary component surface.
--4ui-textPrimary foreground color.
--4ui-borderDefault control and panel border.

Accessibility

  • Arrow keys skip disabled rows; Enter, Space, Home, End and Escape all behave as in a menu.
  • Only one row menu is open at a time — opening one closes its neighbour.
  • A hover-opened menu never steals focus, so typing in a filter box is uninterrupted.

Dependencies

Icon