<ts-radio> vv0.4.0
The ts-radio component.
Open in Storybook for interactive demos.
<ts-radio size="md">Content</ts-radio>
| Property | Attribute | Type | Default | Description |
|---|
checked | checked | boolean | false | Whether the radio is checked. |
disabled | disabled | boolean | false | Renders the radio as disabled. |
label | label | string | undefined | — | Label text. If omitted, use the default slot. |
name | name | string | undefined | — | Name attribute for form submission. |
size | size | "lg" | "md" | "sm" | 'md' | The radio size. |
value | value | string | '' | The value associated with this radio. |
| Event | Detail | Bubbles | Composed | Description |
|---|
tsChange | TsCheckboxChangeEventDetail | Yes | Yes | Emitted when the radio is selected. |
| Method | Signature | Description |
|---|
select | select() => Promise<void> | Programmatically select the radio. |
| Name | Description |
|---|
*(default)* | Default slot for the radio label. |
Use ::part() to style internal elements:
| Part | Description |
|---|
base | The radio container. |
control | The visual radio circle. |
label | The label wrapper. |
<ts-radio size="md">Content</ts-radio>
import { TsRadio } from '@tessera-ui/react';
<TsRadio size="md">Content</TsRadio>