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

    10
  • Progress Bar

    Progress Bar

    4
  • Breadcrumb

    Breadcrumb

    4
  • Spinner

    Spinner

    1
  • Accordion

    Accordion

    1
  • Navbar

    Navbar

    1
  • Kbd

    Kbd

  • Pagination

    Pagination

More in Forms

View all
  • Form

    Form

    7
  • Login 2

    Login 2

    16
  • Contact Form

    Contact Form

    33
  • Contact Card

    Contact Card

    1.1K
  • Book A Demo 1

    Book A Demo 1

    95
  • Premium Auth

    Premium Auth

    613
  • Onboarding Stepper

    Onboarding Stepper

    13
  • Authentication Card

    Authentication Card

    52