zynactradocs

Radio Group

Pick exactly one of a few visible options.

Usage

import { Label } from "@zynactra/ui/label"
import { RadioGroup, RadioGroupItem } from "@zynactra/ui/radio-group"
<RadioGroup defaultValue="option-one">
  <div className="flex items-center gap-3">
    <RadioGroupItem value="option-one" id="option-one" />
    <Label htmlFor="option-one">Option One</Label>
  </div>
  <div className="flex items-center gap-3">
    <RadioGroupItem value="option-two" id="option-two" />
    <Label htmlFor="option-two">Option Two</Label>
  </div>
</RadioGroup>

Guidelines

  • The radio dot is the only round control in the system.

API reference

Behaviour and props come from Base UI. See the Base UI Radio Group docs.

Edit on GitHub

On this page