Skip to content

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
Main heroine
Main heroine (short)
  • Native radios in a fieldset: arrow keys move and select, Tab leaves the group. label is the legend.
  • Inside a Field the field's label names the group (each radio keeps its own), and the field's error reaches it.
  • description on a radio adds a line under its label; orientation="horizontal" for short labels.

Usage ​

ts
import { BlessRadioGroup, BlessRadio } from "blessing-ui";

API ​

BlessRadioGroup ​

Props

NameTypeDefaultDescription
idstring—
namestring—
labelstring—
orientation"horizontal" | "vertical""vertical"
disabledboolean—
invalidboolean—
modelValueT—

Events

NamePayloadDescription
update:modelValue[value: T | undefined]

Slots

NameScopeDescription
label—
default—

BlessRadio ​

Props

NameTypeDefaultDescription
value*string | number—
idstring—
disabledboolean—
descriptionstring—

Slots

NameScopeDescription
default—

Released under the MIT License. Character names and artwork belong to their owners.