About
A styled radio button input with optional label and description text, for building radio groups and option lists.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Radio to your project and fits it to your theme.
Code
How Radio is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import Radio from "@/components/ui/radio";
import { useState } from "react";
export default function RadioDemo() {
const [plan, setPlan] = useState("pro");
return (
<div className="flex w-full max-w-sm flex-col gap-4 p-6">
<Radio
name="plan"
value="free"
checked={plan === "free"}
onChange={() => setPlan("free")}
label="Free"
description="Basic features for individuals getting started."
/>
<Radio
name="plan"
value="pro"
checked={plan === "pro"}
onChange={() => setPlan("pro")}
label="Pro"
description="Advanced features for growing teams."
/>
<Radio
name="plan"
value="enterprise"
checked={plan === "enterprise"}
onChange={() => setPlan("enterprise")}
label="Enterprise"
description="Custom solutions with dedicated support, currently unavailable."
disabled
/>
</div>
);
}















