Skip to content

Segmented Button Component

A segmented button component.

Properties

NameTypeDefaultDescription
selectedbooleanfalseIndicates whether the button is selected.
disabledbooleanfalseIndicates whether the button is disabled.

Slots

NameDescription
defaultsegmented button content

CSS Parts

NameDescription
buttonThe main container for the button.

Check this link to learn how to use CSS parts for Segmented Button Component.

CSS Properties

TokenDefaultDescription
--tap-font-family--tap-sys-font-familyThe font family used in the button.
--tap-segmented-button-border-radius--tap-sys-radius-fullThe border radius of the button.
--tap-segmented-button-color--tap-sys-color-content-primaryThe text color of the button.
--tap-segmented-button-line-height--tap-sys-typography-label-sm-heightThe line height of the button text.
--tap-segmented-button-font-size--tap-sys-typography-label-sm-sizeThe font size of the button text.
--tap-segmented-button-font-weight--tap-sys-typography-label-sm-weightThe font weight of the button text.
--tap-segmented-button-selected-background-color--tap-sys-color-surface-primaryThe background color of the selected button.