Cnippet

Radio Group

Forms

About

A set of checkable radio buttons where only one option can be selected at a time, built with Base UI for accessible forms.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Radio Group to your project and fits it to your theme.

Code

How Radio Group is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { Label } from "@/components/ui/label";
import { Radio, RadioGroup } from "@/components/ui/radio-group";

export default function RadioGroupDemo() {
  return (
    <RadioGroup defaultValue="next">
      <Label>
        <Radio value="next" /> Next.js
      </Label>
      <Label>
        <Radio value="vite" /> Vite
      </Label>
      <Label>
        <Radio value="astro" /> Astro
      </Label>
    </RadioGroup>
  );
}

Dependencies

More by Cnippet

View all
  • Team

    Team

    1.3K
  • Davincho Hero-1

    Davincho Hero-1

    692
  • Aero Hero-3

    Aero Hero-3

    591
  • Features

    Features

    521
  • Random Letter Swap Navigation

    Random Letter Swap Navigation

    516
  • Services with Animated Hover Modal

    Services with Animated Hover Modal

    474
  • Blogs

    Blogs

    399
  • Aero Hero-1

    Aero Hero-1

    369

More in Forms

View all
  • Form

    Form

    137
  • Contact Card

    Contact Card

    1.1K
  • Premium Auth

    Premium Auth

    540
  • Login 1

    Login 1

    57
  • Card Studio

    Card Studio

    45
  • Login 2

    Login 2

    10
  • Login Card

    Login Card

    30
  • Book A Demo 1

    Book A Demo 1

    80