adn-ui
Components

Radio

A high-quality, styled React radio button and group component built with @base-ui/react.

The Radio component provides single-selection radio button controls grouped within a RadioGroup.

Usage

import { Radio } from "@/components/ui/radio";

export function ExampleRadio() {
  return (
    <Radio.Group defaultValue="option-1">
      <label className="flex items-center gap-2 text-sm font-medium">
        <Radio.Root value="option-1">
          <Radio.Indicator />
        </Radio.Root>
        Option 1
      </label>
      <label className="flex items-center gap-2 text-sm font-medium">
        <Radio.Root value="option-2">
          <Radio.Indicator />
        </Radio.Root>
        Option 2
      </label>
    </Radio.Group>
  );
}

Preview

Anatomy

import { Radio } from "@base-ui/react/radio";
import { RadioGroup } from "@base-ui/react/radio-group";

<RadioGroup>
  <Radio.Root>
    <Radio.Indicator />
  </Radio.Root>
</RadioGroup>;

API Reference

Radio.Group Props

PropTypeDefaultDescription
valuestringundefinedControlled value of the selected radio button.
defaultValuestringundefinedInitial uncontrolled selected radio value.
onValueChange(value: string) => voidundefinedCallback fired when selected value changes.
disabledbooleanfalseDisables user interaction for all radio buttons in the group.

Radio.Root Props

PropTypeDefaultDescription
valuestringRequiredUnique value identifying this radio option.
disabledbooleanfalseDisables this specific radio option.

On this page