Skip to Content
Columbus

Radio Group

A set of mutually exclusive options presented as radio buttons.

Installation

pnpm dlx shadcn@latest add @columbus/radio-group

Usage

Wrap each Radio in a Label, and give the group a name with aria-label or a legend. Tab moves focus into the group and arrow keys change the selection.

import { Label } from "@/components/ui/label";
import { Radio, RadioGroup } from "@/components/ui/radio-group";

<RadioGroup aria-label="Framework" defaultValue="next">
  <Label>
    <Radio value="next" /> Next.js
  </Label>
  <Label>
    <Radio value="vite" /> Vite
  </Label>
</RadioGroup>;

Radio is also exported as RadioGroupItem.

With description

Basic features for personal use.

Advanced tools for professionals.

Card

With a legend

Render a Field as a Fieldset to give the group a visible legend. The field's name is used when the form is submitted.

Plan

You can change plans at any time.

API reference

RadioGroup and Radio wrap Base UI Radio Group and Base UI Radio.Root, and accept all their props. Columbus adds a vertical layout and the indicator.

RadioGroup

Prop

Type

Radio

Prop

Type

On this page