Radio Group

Single-choice radio selection group built on Radix RadioGroup primitive supporting radio buttons and selectable card grid layouts.

// Radix — @radix-ui/react-radio-group
import { Radio, RadioGroup } from "@shavin/ui";

Default Radio Group

Component Source
const [plan, setPlan] = useState("free");

<RadioGroup value={plan} onValueChange={setPlan} className="space-y-2">
  <Radio value="free" label="Free" />
  <Radio value="pro" label="Pro" />
  <Radio value="team" label="Team" />
  <Radio value="enterprise" label="Enterprise (disabled)" disabled />
</RadioGroup>

Radius control — default "inherit" (follows theme radius), custom overrides per item or group

Component Source
<RadioGroup value={plan} onValueChange={setPlan} className="space-y-2">
  <Radio value="free" label="Round (full)" radius="full" />
  <Radio value="pro" label="Square (none)" radius="none" />
  <Radio value="team" label="Theme Inherit" radius="inherit" />
</RadioGroup>

Cards Variant (variant='cards')

Component Source
const [size, setSize] = useState("md");

<RadioGroup variant="cards" value={size} onValueChange={setSize} className="w-full">
  <Radio value="sm" label="Small" description="Compact size" />
  <Radio value="md" label="Medium" description="Standard size" />
  <Radio value="lg" label="Large" description="Spacious size" />
  <Radio value="xl" label="Extra Large" description="Disabled option" disabled />
</RadioGroup>

Props

RadioGroup Props

PropTypeDefaultDescription
variant"default" | "cards"radioVisual variant: default radio buttons or cards layout. Default "default".
radiusRadiusPresetinheritRadius style for radio items or card containers. Default "inherit".

Radio Props

PropTypeDefaultDescription
value*string—Option value string.
labelstring—Primary option label text.
descriptionstring—Optional secondary description text for card layout.
disabledboolean—Disabled state.
radiusRadiusPreset—Radius override for this specific item.
variant"default" | "cards"—Variant override for this specific item.
classNamestring—Custom wrapper class name.
childrenReactNode—Custom children element to render inside card or label.

* required

Configure Theme
Theme
Accent Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font