SplitButton

SplitButton groups a set of commands in an overlay with a default action item.

SplitButton has a default action button and a collection of additional options defined by the model property based on MenuModel API.

SplitButton has a default action button and a collection of additional options defined by the model property based on MenuModel API.

basic-demo

The buttons and menuitems have support to display icons.

icons-demo

SplitButton has a default action button and a collection of additional options defined by the model property based on MenuModel API.

nested-demo

The severity property defines the type of button.

severity-demo

When the disabled attribute is present, the element is uneditable and unfocused. Additionally, the disabled states of the button and menu button can be handled independently. The button is disabled when buttonDisabled is present, and the menu button is disabled when menuButtonDisabled is present.

disabled-demo

Raised buttons display a shadow to indicate elevation.

raised-demo

Rounded buttons have a circular border radius.

rounded-demo

Text buttons are displayed as textual elements.

text-demo

Text buttons can be displayed as raised as well for elevation.

raised-text-demo

Outlined buttons display a border without a background initially.

outlined-demo

SplitButton provides small and large sizes as alternatives to the standard.

sizes-demo

SplitButton has a default action button and a collection of additional options defined by the model property based on MenuModel API.

template-demo

Screen Reader

SplitButton component renders two native button elements, main button uses the label property to define aria-label by default which can be customized with buttonProps. Dropdown button requires an explicit definition to describe it using menuButtonProps option and also includes aria-haspopup, aria-expanded for states along with aria-controls to define the relation between the popup and the button.

The popup overlay uses menu role on the list and each action item has a menuitem role with an aria-label as the menuitem label. The id of the menu refers to the aria-controls of the dropdown button.

Main Button Keyboard Support

KeyFunction
enterActivates the button.
spaceActivates the button.

Menu Button Keyboard Support

KeyFunction
enterToggles the visibility of the menu.
spaceToggles the visibility of the menu.
down arrowOpens the menu and moves focus to the first item.
up arrowOpens the menu and moves focus to the last item.

Menu Keyboard Support

KeyFunction
enterActives the menuitem, closes the menu and sets focus on the menu button.
escapeCloses the menu and sets focus on the menu button.
down arrowMoves focus to the next item, if it is the last one then first item receives the focus.
up arrowMoves focus to the previous item, if it is the first one then last item receives the focus.
homeMoves focus to the first item.
endMoves focus to the last item.
ON THIS PAGE
PrimeBlocks
490+ ready to use UI blocks crafted with PrimeNG and Tailwind CSS.
Learn More