Skip to main content

SegmentedButton

The ui5-segmented-button shows a group of items. When the user clicks or taps one of the items, it stays in a pressed state. It automatically resizes the items to fit proportionally within the component. When no width is set, the component uses the available width.

ES6 Module Import​

import "@ui5/webcomponents/dist/SegmentedButton.js";

Basic Sample​

Properties​

accessibleName​

DescriptionDefines the accessible ARIA name of the component.
Typestring | undefined
Defaultundefined
Since1.0.3

selectionMode​

DescriptionDefines the component selection mode.
Type"Single" | "Multiple"
Default"Single"
Since1.14.0

selectedItems​

DescriptionReturns an array of the currently selected items.
TypeArray<ISegmentedButtonItem>
Default[]
Readonlytrue
Since1.14.0

Slots​

default​

DescriptionDefines the items of ui5-segmented-button.
Note: Multiple items are allowed.
Note: Use the ui5-segmented-button-item for the intended design.
TypeArray<ISegmentedButtonItem>

Events​

selection-change​

DescriptionFired when the selected item changes.
TypeCustomEvent<SegmentedButtonSelectionChangeEventDetail>
ParametersselectedItems: Array<ISegmentedButtonItem>
an array of selected items.
Since:1.14.0

Methods​

No methods available for this component.

CSS Parts​

No CSS parts available for this component.

More Samples​

Selection Modes​

You can define if single or multiple buttons can be pressed.