alwkala

Radio

Forms

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>
  );
}

More by alwkala

View all
  • Callout

    Callout

    9
  • Progress Bar

    Progress Bar

    2
  • Kbd

    Kbd

  • Pagination

    Pagination

  • Back To Top

    Back To Top

  • Checkbox

    Checkbox

  • Seal

    Seal

  • Egyptian Sidebar Menu

    Egyptian Sidebar Menu

More in Forms

View all
  • Premium Auth

    Premium Auth

    577
  • Login 1

    Login 1

    68
  • Contact Card

    Contact Card

    1.1K
  • Form

    Form

    18
  • Login Card

    Login Card

    36
  • Login 2

    Login 2

    15
  • Change Password Form

    Change Password Form

    11
  • Form

    Form

    3