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

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

<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')

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

PropTypeDefault
variant"default" | "cards"
radiusRadiusPreset"inherit"

Radio Props

PropTypeDefault
value*string
labelstring
descriptionstring
disabledboolean
radiusRadiusPreset"inherit"
variant"default" | "cards"
classNamestring
childrenReactNode

* required

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