RadioGroup
Native radios
One choice out of a few (up to about six) that should all be visible at once. More than that, or when space is short: Select. A single on/off is a Switch or Checkbox, not two radios.
Basic
- Native radios in a
fieldset: arrow keys move and select, Tab leaves the group.labelis the legend. - Inside a Field the field's label names the group (each radio keeps its own), and the field's error reaches it.
descriptionon a radio adds a line under its label;orientation="horizontal"for short labels.
Usage
ts
import { BlessRadioGroup, BlessRadio } from "blessing-ui";API
BlessRadioGroup
Props
| Name | Type | Default | Description |
|---|---|---|---|
id | string | — | |
name | string | — | |
label | string | — | |
orientation | "horizontal" | "vertical" | "vertical" | |
disabled | boolean | — | |
invalid | boolean | — | |
modelValue | T | — |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: T | undefined] |
Slots
| Name | Scope | Description |
|---|---|---|
label | — | |
default | — |
BlessRadio
Props
| Name | Type | Default | Description |
|---|---|---|---|
value* | string | number | — | |
id | string | — | |
disabled | boolean | — | |
description | string | — |
Slots
| Name | Scope | Description |
|---|---|---|
default | — |