Malay Patel

Radio Group

Component

About

A radio group where one dot travels to the option you choose instead of blinking, as plain rows or bordered cards with an outline that follows, with full arrow-key control. Free component from uibrik (uibrik.com).

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 } from "@/components/ui/radio-group";

const OPTIONS = [
  { value: "standard", label: "Standard", description: "4–6 business days", meta: "Free" },
  { value: "express", label: "Express", description: "2–3 business days", meta: "$9" },
  { value: "overnight", label: "Overnight", description: "Next business day", meta: "$24" },
];

const { descriptions, ...props } = {
  variant: "cards" as "cards" | "list",
  orientation: "vertical" as "vertical" | "horizontal",
  size: "md" as "sm" | "md" | "lg",
  duration: 0.3,
  disabled: false,
  descriptions: true,
};

export default function Demo() {
  const options = descriptions ? OPTIONS : OPTIONS.map((o) => ({ value: o.value, label: o.label }));
  return (
    <div className="flex h-screen w-full items-center justify-center px-4">
      <div className="w-full max-w-sm">
        <RadioGroup {...props} options={options} defaultValue="express" label="Shipping" />
      </div>
    </div>
  );
}

Dependencies

More by Malay Patel

View all
  • Halftone

    Halftone

    48
  • Balloon Button

    Balloon Button

    33
  • Fold Toolbar

    Fold Toolbar

    31
  • Hold To Confirm

    Hold To Confirm

    13
  • Marquee

    Marquee

    8
  • Aurora

    Aurora

    5
  • Copy Button

    Copy Button

    4
  • Otp Input

    Otp Input

    3