SplitButton

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

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

PREVIEW

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 variant of a button.

severity-demo

When the disabled attribute is present, the element is uneditable and unfocused.

disabled-demo

Raised buttons display a shadow to indicate elevation.

raised-demo

Rounded buttons have a circular border radius.

rounded-sm-demo

Text buttons are displayed as textual elements.

text-demo

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

raisedtext-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

Custom content inside a button is defined as children.

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
enterspacedown arrowup arrowOpens the menu and moves focus to the first item.

Menu Keyboard Support

KeyFunction
enterIf menuitem has a submenu, opens the submenu otherwise activates the menuitem and closes all open overlays.
spaceIf menuitem has a submenu, opens the submenu otherwise activates the menuitem and closes all open overlays.
escapeIf focus is inside a popup submenu, closes the submenu and moves focus to the root item of the closed submenu.
down arrowMoves focus to the next menuitem within the submenu.
up arrowMoves focus to the previous menuitem within the submenu.
alt + up arrowCloses the popup, then moves focus to the target element.
right arrowIn nested mode if option is closed, opens the option otherwise moves focus to the first child option.
left arrowIn nested mode if option is open, closes the option otherwise moves focus to the parent option.
homeMoves focus to the first menuitem within the submenu.
endMoves focus to the last menuitem within the submenu.
any printable characterMoves focus to the menuitem whose label starts with the characters being typed.
Theme Designer