Skip to content

Split button ​

hx-split-button is a default action with a menu of related actions: a button and, joined to it, a button that opens an hx-menu.

html
<hx-split-button label="Save" icon="pi pi-save" [model]="items" (click)="save()" (triggered)="onPick($event)" />
Input / outputTypeDefaultDescription
labelstringText of the main button.
iconstringIcon font classes for the main button.
modelHxMenuItem[][]The related actions.
variant'filled' | 'outlined' | 'text' | 'link''filled'As on hx-button.
severityHxButtonSeverity'primary'As on hx-button.
size'small' | 'medium' | 'large''medium'As on hx-button.
rounded, raised, disabledbooleanfalsePill shape, elevation shadow, disables both buttons.
menuButtonLabelstring'More actions'Name of the menu button.
(triggered)HxMenuItemAn item was activated (after its command).

(click) is the native click of the main button; clicks on the menu button do not reach it.

  • Accessibility: a role="group" named by label, with two buttons; the menu button has aria-haspopup="menu" and aria-expanded, and the menu moves the focus back to it when it closes. See Menu for the keyboard.

Tokens ​

The look comes from the design tokens --h-splitbutton-* (see Theming); override them in your theme, never the component CSS.

Part of @gravionlabs/helix-ui; all components are listed in the component reference.

Released under the MIT licence.