Skip to content

Radio Group ​

bo-radio-group provides one selected value to its bo-radio-group-item children. The group handles arrow-key movement and forwards its name to each native radio input.

Usage ​

Plan: standard

<bo-radio-group v-model="plan" aria-label="Plan">
  <bo-radio-group-item value="standard" label="Standard" description="For personal projects." />
  <bo-radio-group-item value="team" label="Team" description="For small teams." />
</bo-radio-group>

Orientation and States ​

Use orientation="horizontal" for inline choices. disabled on the group disables every item; an individual item can also be disabled.

<bo-radio-group v-model="plan" orientation="horizontal" aria-label="Theme">
  <bo-radio-group-item value="light" label="Light" />
  <bo-radio-group-item value="dark" label="Dark" />
</bo-radio-group>

API ​

Component / prop / event / slotTypeDefaultDescription
BoRadioGroupcomponent-Group context and selected model.
id / dataTestIdstringautogeneratedGroup attributes.
modelValuestring | number-Selected value used by v-model.
orientationhorizontal | verticalverticalItem layout and arrow-key direction.
disabled / requiredbooleanfalseGroup state.
namestringgroup idShared native radio name.
role / ariaLabel / ariaLabelledBynative accessibility types-Group semantics.
update:modelValue(value: string | number) event-Emitted when the selection changes.
defaultslot-BoRadioGroupItem children.
BoRadioGroupItemcomponent-Native radio item.
id / dataTestIdstringautogeneratedItem attributes.
valuestring | numberrequiredValue represented by the item.
label / descriptionstring-Visible item text.
disabledbooleanfalseDisables this item.
role / ariaLabel / ariaDescribedBynative accessibility types-Item semantics.
defaultslot-Additional content beside the label and description.

Released under the MIT License.