Repository navigation
hx components Actions
github-actions[bot] edited this page Sep 22, 2026
·
4 revisions
Dropdown action menu — combines a trigger button with a popup containing action items.
<HxActions
$model={form}
leading={<HxButton text="Actions" />}
tailing={
<HxFlex direction="dir-y">
<HxButton text="Edit" variant="ghost" onClick={edit} />
<HxButton text="Duplicate" variant="ghost" onClick={dup} />
<HxSeparator />
<HxButton text="Delete" variant="ghost" color="danger" onClick={del} />
</HxFlex>
}
color="primary"
variant="outline"
/>| Prop | Type | Default | Description |
|---|---|---|---|
$model |
HxObject<T> |
— | Optional reactive model |
color |
HxColor |
'primary' |
Trigger button colour |
variant |
HxButtonVariant |
'solid' |
Trigger button variant |
leading |
HxActionsLeading |
— | Trigger content (click to toggle popup); defaults to a "More" (ellipsis) button when omitted |
tailing |
HxActionsTailing |
required | Popup dropdown content |
zIndex |
number |
config default | Popup z-index |
gapToEdge |
number |
config default | Trigger-to-popup gap (px) |
Plus the HxFlex container props (padding / margin / border, alignItems, alignContent, justifyContent, gapY and the flex / grid cell props; direction and wrap are fixed to dir-x / no-wrap on the trigger).
-
HxActionsLeadingContent— Popup show/hide state, click-outside detection, keyboard event handling -
HxActionsTailingContent— Popup rendering with hover management viadata-hx-hover
- Escape — Close popup
- Enter / Space — With the popup open, select the currently hovered item
- Arrow Up / Down — With the popup closed, open it; with it open, move the hover to the previous / next item
All events on the trigger button and popup content are forwarded. In practice, interaction is via leading/tailing content's own events (onClick on menu items), with keyboard navigation handled internally.
import { configHxActions } from '@hx/components';
configHxActions({ color: 'primary', variant: 'solid' });- Overview
- Common Concepts
- I18n
- Data Attributes
- Form Components
- Layout Components
- Display Components
- Overlay Components
- Structure Components
- Validation
- Hooks
- Utilities