About
A radio button group with spring press physics and an animated shared indicator dot that pops smoothly between the selected option.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Motion Radio Group to your project and fits it to your theme.
Code
How Motion Radio Group is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import { RadioGroup, RadioGroupItem } from "@/components/ui/motion-radio-group";
export default function MotionRadioGroupDemo() {
return (
<div className="flex w-full items-center justify-center p-10">
<RadioGroup defaultValue="comfortable" className="max-w-sm">
<div className="flex items-center gap-3">
<RadioGroupItem value="default" id="r1" />
<label htmlFor="r1" className="text-sm font-medium">
Default
</label>
</div>
<div className="flex items-center gap-3">
<RadioGroupItem value="comfortable" id="r2" />
<label htmlFor="r2" className="text-sm font-medium">
Comfortable
</label>
</div>
<div className="flex items-center gap-3">
<RadioGroupItem value="compact" id="r3" />
<label htmlFor="r3" className="text-sm font-medium">
Compact
</label>
</div>
</RadioGroup>
</div>
);
}
















