SwitchOption
<ts-switch-option> vv0.4.0
The ts-switch-option component.
Open in Storybook for interactive demos.
Preview
Section titled “Preview”<ts-switch-option>Content</ts-switch-option>Properties
Section titled “Properties”| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
active | active | boolean | false | Whether this option is the active selection (set by parent). |
disabled | disabled | boolean | false | Disables this option. |
icon | icon | string | undefined | — | Optional icon name. |
value | value | string | undefined | — | Unique identifier for this option. |
| Name | Description |
|---|---|
*(default)* | Default slot for label text. |
CSS Parts
Section titled “CSS Parts”Use ::part() to style internal elements:
| Part | Description |
|---|---|
base | The option container. |
icon | The icon wrapper. |
ts-switch-option::part(base) { /* your custom styles */}<ts-switch-option>Content</ts-switch-option>import { TsSwitchOption } from '@tessera-ui/react';
<TsSwitchOption>Content</TsSwitchOption>