RowActions
HkRowActions is the library's standard ⋯ at the trailing edge of a data row. It is one ghost icon button at the roster size step with a localized accessible name, and it comes in two modes: a trigger that only reports the press (open, carrying the button itself so a window can restore focus to it on close), and a menu that hosts an HkMenu popup over the items you hand it and reports the choice. The component exists because the same HkIconButton plus MoreHorizontal was hand-rolled in view after view; what it standardizes is the glyph, the size step, the label and the click isolation.
- Reach for it when a row's option menu should open beside the row it belongs to: table rows, panel rows, any list that is not a card list.
- It owns the affordance, never the destination. In trigger mode the consumer decides what opens; in menu mode the popup is the library's own, so a row that needs a window instead of a menu wants trigger mode.
- The press is stopped from reaching ancestors, so a trigger placed inside a clickable cell or row opens only itself. That is the same contract CopyBadge follows, and the reason a row-level drill-through never fires twice.
- Vue only. There is no Rust form: packages/components/src ships no RowActions, and the mirror's card-list rows express their per-row controls through ListRow's own actions array. A Rust page renders its own ⋯ button and menu.
Import
;
from "@celestia-island/hikari";
The component is a single default export from the barrel, so one import path covers both the component and the item type its items prop takes.
The two modes
label is the trigger's accessible name and, in menu mode, the popup's title. Omitted, it falls back to the library's localized "Row actions" (hikari::table.rowActions), so an unnamed kebab never reaches the page.
size picks a step from HkIconButton's ladder — 16 | 24 | 28 | 32 | 36 | 40, default 28, the roster step the row-manage pattern standardized on. The glyph follows the box: 14 units up to 28, 16 from 32, so a large trigger is not a small kebab in a big ring. disabled dims the trigger, swallows the press and blocks it from toggling the menu open.
opened in that example is the point of trigger mode: the open payload is the trigger's own <button> element, so the caller can hand it to a manage window as the element to restore focus to when the window closes. It is never null — the component falls back to the clicked element if its own ref has not landed.
Menu mode
Pass items and the same button becomes the menu's anchor: aria-haspopup="menu" and aria-expanded appear on the trigger, a press toggles the popup, and a chosen row emits select with the whole HkMenuItem (after the popup has closed itself). Every HkMenuItem field is available — key, label, icon, danger, disabled, checked, badge, nested children — because the popup is the real HkMenu and not a reduced copy of it.
placement positions the desktop popout: bottom-end by default, because rows sit at the table's trailing edge and a bottom-start panel would hang off the screen. Below the library-wide 768px breakpoint the same popup docks as a mobile bottom sheet on the shared panel surface, and the placement no longer applies.
A second press on the same ⋯ closes the menu. That is deliberate: the hand-rolled kebab-plus-menu pairs this component replaces toggled on re-click, and the anchor hit-containment inside the popup would otherwise swallow the press.
Picked: nothing yet
API
Vue
Props
| Name | Type | Default | Required |
|---|---|---|---|
| label | String | undefined | — |
| size | <code>Number as PropType<16 | 24 | 28 | 32 | 36 | 40></code> | 28 | — |
| disabled | Boolean | false | — |
| items | Array as PropType<HkMenuItem[]> | undefined | — |
| placement | <code>String as PropType< "bottom-start" | "bottom-end" | "top-start" | "top-end" | "right-start" | "left-start" ></code> | "bottom-end" | — |
Emits
| Event | Payload |
|---|---|
| open | HTMLElement |
| select | HkMenuItem |
Accessibility
- The trigger is a real <button type="button"> from HkIconButton with aria-label from label (or the localized "Row actions"), so a ⋯ with no visible text still has a name. Give it a per-row label ("Actions for api-prod-01") when several rows are on screen: "Row actions" repeated twenty times names nothing.
- In menu mode the trigger carries aria-haspopup="menu" and a live aria-expanded, so the open state is announced and the popup is identified before it opens. The popup itself is named by label (the sheet's header on mobile, the popout's label on desktop), and its rows are plain buttons reached with Tab rather than a role="menu" structure — the full contract is on Menu.
- disabled puts the native disabled attribute on the trigger's <button> (through HkIconButton), so it is announced as unavailable and skips activation instead of silently swallowing a press. Use the menu's own per-item disabled when the trigger should stay reachable and only some entries unavailable.
- The trigger stops its click from propagating, which keeps a row-level action from also firing a row-level navigation. It does not stop keyboard events: a row that listens for Enter on its own keydown handler will still see the key — give such a row the target check that ListRow documents.
- The glyph is decoration inside a named button; nothing is announced for it, and no state rides on the glyph's shape.
Related components
- ListRow — the card-list row, whose own actions array is the list-shaped version of this affordance.
- Table — the container where a RowActions trigger is the habitual trailing cell.
- Menu — the popup that menu mode mounts, with its items, placement and keyboard contract.
- IconButton — the button this component composes; use it directly when the row control is not a ⋯.
- CopyBadge — the other interactive element that follows the same "stop the press" rule inside a cell.