SegmentedButton

Introduction

The SegmentedButton control is used to display a group of Buttons. The Buttons behave like ToggleButtons, and only one button can be selected at once. Normally the SegmentedButton is used as a kind of "ViewSwitch" within a ToolBar.

A SegmentedButton can be rendered as "normal" or "lite" version depending on the kind of sap.ui.commons.Button buttons that were added. With the enabled property all the buttons can be enabled/disabled. Via the selectedButtoncode> association one button can be set selected by the application.

Examples

SegmentedButton (text only)

SegmentedButton lite (text only)

SegmentedButton (icons only)

SegmentedButton lite (icons only)

Keyboard Support

It is possible to navigate through the buttons via the Arrow right and Arrow left keys forwards and backwards. The same can be achieved via the Arrow up and Arrow down keys. If you reach the end of the buttons and then select the next button, the display starts from the first button again. The Space and Enter keys can be used to select a button.

ARIA Support

The SegmentedButton has the ARIA role set to radiogroup. ARIA support for the buttons inside the SegmentedButton is depending on the buttons themselves. See Button The aria-disabled attribute is set accordingly to the status of the enabled property of the SegmentedButton.

API Documentation

See API documentation