Mohamed Uvaish

Radio Group

Forms

About

Radio group as plain radios or selectable cards with a hint and a price. Arrow keys move and select, per the ARIA pattern. Part of the Layro System: layro.vercel.app.

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 * as React from "react";
import { RadioGroup, RadioGroupItem } from "@/components/ui/layro-radio-group";

/* One choice from a few. Cards for plans, with the price on the right;
   plain radios for the billing period. Arrow keys move and select. */

export default function RadioGroupDemo() {
  return (
    <div className="flex min-h-screen w-full items-center justify-center bg-background p-6">
      <div className="w-full min-w-0 rounded-[18px] [corner-shape:squircle] bg-card p-6 text-card-foreground ring-1 ring-border" style={{ maxWidth: 400 }}>
        <h2 className="text-[16px] font-semibold tracking-[-0.01em]">Choose a plan</h2>
        <div className="mb-5" />
        <RadioGroup defaultValue="team" variant="card" aria-label="Plan">
          <RadioGroupItem value="starter" label="Starter" hint="For a small team finding its feet" aside="$29" />
          <RadioGroupItem value="team" label="Team" hint="For a studio with clients" aside="$89" />
          <RadioGroupItem value="scale" label="Scale" hint="For several teams under one roof" aside="$249" />
        </RadioGroup>
        <RadioGroup defaultValue="month" aria-label="Billing period" className="mt-4 flex! gap-5">
          <RadioGroupItem value="month" label="Monthly" />
          <RadioGroupItem value="year" label="Yearly" />
        </RadioGroup>
      </div>
    </div>
  );
}

Dependencies

More by Mohamed Uvaish

View all
  • Signature Pad

    Signature Pad

    435
  • Folder Card

    Folder Card

    347
  • Share Dialog

    Share Dialog

    313
  • Kanban Board

    Kanban Board

    271
  • Notification Panel

    Notification Panel

    112
  • Charts & KPI Cards

    Charts & KPI Cards

    100
  • Web Shot Button

    Web Shot Button

    57
  • Rich Text Editor

    Rich Text Editor

    50

More in Forms

View all
  • Premium Auth

    Premium Auth

    524
  • Contact Card

    Contact Card

    1K
  • Book A Demo 1

    Book A Demo 1

    73
  • Login 1

    Login 1

    53
  • Form

    Form

    137
  • Card Studio

    Card Studio

    41
  • Modern & Stunning sign in

    Modern & Stunning sign in

    1.6K
  • SignInPage

    SignInPage

    667

Explore more

Part of Layro System — browse the full library on 21st.dev.