Skip to content

Radio Group

A set of checkable buttons—known as radio buttons—where no more than one of the buttons can be checked at a time.

Examples

Default

vue
<RadioGroup default-value="option-one">
  <div class="flex items-center space-x-2">
    <RadioGroupItem id="option-one" value="option-one" />
    <Label for="option-one">Option One</Label>
  </div>
  <div class="flex items-center space-x-2">
    <RadioGroupItem id="option-two" value="option-two" />
    <Label for="option-two">Option Two</Label>
  </div>
</RadioGroup>

Props

RadioGroup

PropTypeDefaultDescription
defaultValuestring-The default value of the radio group.
modelValuestring-The controlled value of the radio group.
disabledbooleanfalseWhether the radio group is disabled.
namestring-The name of the radio group.
requiredbooleanfalseWhether the radio group is required.
orientationhorizontal | verticalverticalThe orientation of the radio group.
dirltr | rtl-The reading direction of the radio group.
loopbooleantrueWhether the keyboard navigation should loop around.

RadioGroupItem

PropTypeDefaultDescription
valuestring-The value of the radio item.
disabledbooleanfalseWhether the radio item is disabled.
requiredbooleanfalseWhether the radio item is required.

Slots

RadioGroup

SlotDescription
defaultThe items of the radio group.

RadioGroupItem

SlotDescription
defaultThe content of the radio item.