Radio Group
A radio group with a popping dot, selectable card rows, and optional glide and ring effects.
Customize
Installation
Add the base radio group with the registry command:
npx shadcn@latest add @kinetic/radio-groupInstall an effect separately when you need it. Each command also installs the base radio group.
npx shadcn@latest add @kinetic/glide-radio-group
npx shadcn@latest add @kinetic/ring-radio-groupUsage
Import the group and its items. Each item needs a unique value:
import { RadioGroup, RadioGroupItem } from "@/components/kinetic/ui/radio-group";
export function Plan() {
return (
<RadioGroup defaultValue="free" aria-label="Plan">
<RadioGroupItem value="free" aria-label="Free" />
<RadioGroupItem value="pro" aria-label="Pro" />
</RadioGroup>
);
}Glide
Use GlideRadioGroup to move one shared dot between options on a spring.
import { GlideRadioGroup } from "@/components/kinetic/ui/glide-radio-group";
import { RadioGroupItem } from "@/components/kinetic/ui/radio-group";
<GlideRadioGroup defaultValue="a" aria-label="Options">
<RadioGroupItem value="a" aria-label="Option A" />
<RadioGroupItem value="b" aria-label="Option B" />
</GlideRadioGroup>Ring
Use RingRadioGroup to send a pulse ring outward from the option that becomes selected.
import { RingRadioGroup } from "@/components/kinetic/ui/ring-radio-group";
<RingRadioGroup defaultValue="a" aria-label="Options">...</RingRadioGroup>Every effect accepts the same props as RadioGroup and works with RadioGroupItem and RadioGroupCard.
Sizes
Use size with sm, md, or lg.
<RadioGroup size="lg" defaultValue="a">...</RadioGroup>Controlled state
Pass value with onValueChange to control the group. Use name and disabled for forms.
const [plan, setPlan] = useState("free");
<RadioGroup value={plan} onValueChange={setPlan} name="plan">...</RadioGroup>Cards
Use RadioGroupCard for selectable rows with a title, a description, and an optional label.
<RadioGroup defaultValue="pro">
<RadioGroupCard value="free" title="Free" description="For personal projects" />
<RadioGroupCard value="pro" title="Pro" description="For teams" />
</RadioGroup>Motion preferences
Animations are skipped when reduced motion is enabled, either in the browser or in the Kinetic setting. Use the speed prop to scale animation timing.
API Reference
RadioGroup
Radio group with arrow-key navigation. The selected dot pops in place.
| Prop | Type | Default | Description |
|---|---|---|---|
value / defaultValue / onValueChange | string / (value: string) => void | - | Controlled or initial selected option value. |
size / speed / disabled | "sm" | "md" | "lg" / number / boolean | "md" / 1 / false | Radio circle size, spring speed multiplier (0.25-4), and group disabled state. |
RadioGroupItem / RadioGroupCard
Individual radio circle control or full-width selectable card row with title and description.
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | - | Option value emitted on selection. |
title / description (RadioGroupCard) | React.ReactNode | - | Card label and helper description paired automatically with the radio input. |
GlideRadioGroup
Radio group whose selection dot springs from item to item. Accepts the RadioGroup props.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Omit<RadioGroupProps, "indicator" | "animateSelect"> | - | RadioGroup props. |
RingRadioGroup
Radio group that sends a pulse ring outward from the selected item. Accepts the RadioGroup props.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Omit<RadioGroupProps, "animateSelect"> | - | RadioGroup props. |