zweiundeins

Radio Group

Forms

About

A single-choice radio group with optional per-item descriptions, disabled items, horizontal/vertical layout, server-driven options, keyboard roving-focus navigation and native form submission.

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

"use client";

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

export default function RadioGroupDemo() {
  const [value, setValue] = useState("warp");

  return (
    <RadioGroup label="Drive mode" value={value} onChange={setValue}>
      <Radio value="impulse">Impulse</Radio>
      <Radio value="warp">Warp</Radio>
      <Radio value="tow" disabled>
        Tow (needs a tug)
      </Radio>
    </RadioGroup>
  );
}

More by zweiundeins

View all
  • Theme Switch

    Theme Switch

    11
  • Busy

    Busy

    9
  • ECharts

    ECharts

    1
  • Count Up

    Count Up

    1
  • Sparkline

    Sparkline

  • Drawer

    Drawer

  • Starfield

    Starfield

  • Odometer

    Odometer

More in Forms

View all
  • Premium Auth

    Premium Auth

    524
  • Contact Card

    Contact Card

    1K
  • Book A Demo 1

    Book A Demo 1

    73
  • Form

    Form

    16
  • Login 1

    Login 1

    53
  • Book A Demo 3

    Book A Demo 3

    89
  • Hand-Drawn Checkbox

    Hand-Drawn Checkbox

    48
  • Login Card

    Login Card

    6