Skip to content

SwitchGroup

<ts-switch-group> vv0.4.0

The ts-switch-group component.

Open in Storybook for interactive demos.

<ts-switch-group size="md">Content</ts-switch-group>
PropertyAttributeTypeDefaultDescription
disableddisabledbooleanfalseDisables the entire group.
fullWidthfull-widthbooleanfalseStretch to fill the container width.
sizesize"lg" | "md" | "sm" | "xl" | "xs"'md'The size of the switch group.
valuevaluestring | undefinedThe currently active segment value.
EventDetailBubblesComposedDescription
tsChange{ value: string; }YesYesEmitted when the active value changes.
NameDescription
*(default)*Default slot for ts-switch-option children.

Use ::part() to style internal elements:

PartDescription
baseThe switch group container.
ts-switch-group::part(base) {
/* your custom styles */
}
<ts-switch-group size="md">Content</ts-switch-group>
import { TsSwitchGroup } from '@tessera-ui/react';
<TsSwitchGroup size="md">Content</TsSwitchGroup>