SplitButton

Introduction

The SplitButton is a composite control that consists of a default-action Button and a MenuButton control. The default-action button control represents a simple push button. It is used for initiating actions, such as save or print. It can contain some text, an icon, or both; the order of the two can be configured. The action initiated by this button is considered to be the default action for the control, and it must be one of the selections defined in the menu button menu. The menu button control is a button that opens a menu upon user's click. MenuButton is a composition of the Menu control and the Button control and thus inheriting all features. When a menu item is selected by the user, the menu button throws an event called itemSelected . The event transfers the itemId of the selected item. As an alternative, the button press event can be used which has a similar behavior.

The SplitButton default-action button press function corresponds to the select function of an indicated menu item from the SplitButton menu. The default-action button and specified menu item have the same values for these properties unless overridden at the SplitButton control level:

The first menu item in the SplitButton menu is used for the default-action button if a menu item is not specified or the specified menu item has visible property set to false.

Examples

SplitButton With First Menu Item Defaulted

The default-action button corresponds to the first menu item if a specific menu item is not provided.

SplitButton With Menu Item Specified

The default-action button can be set to any menu item.

SplitButton Control Level Properties

At the SplitButton control level, you can override default-action button text , icon , and enabled properties which are normally derived from the specified menu item.

Lite SplitButton

The split button can be displayed as lite-button using the lite property. Depending on the used theme the button is displayed less prominent.

Special SplitButtons

There are different special layouts for buttons, emphasized, accept and reject. These designs can be activated using the style property.

Keyboard Support

ARIA Support

See API documentation