azabroflovski

Radio

Forms

About

A dark-themed accessible radio group with an optional group label and per-option hints, for letting a user pick exactly one choice from a short list (e.g. shipping method, plan tier). Ported to React from the Vue component in azabroflovski's oyna-ui.

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

"use client";

import Radio from "@/components/ui/radio";
import { useState } from "react";

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

  return (
    <div
      className="w-full max-w-sm rounded-xl p-6"
      style={{ background: "#0b0b0f" }}
    >
      <Radio
        label="Shipping method"
        value={value}
        onChange={setValue}
        items={[
          {
            value: "standard",
            label: "Standard",
            hint: "Delivered in 5-7 business days",
          },
          {
            value: "express",
            label: "Express",
            hint: "Delivered in 1-2 business days",
          },
          {
            value: "overnight",
            label: "Overnight",
            hint: "Currently unavailable",
            disabled: true,
          },
        ]}
      />
    </div>
  );
}

More by azabroflovski

View all
  • Switch

    Switch

    11
  • Select

    Select

    7
  • Dialog

    Dialog

    5
  • Checkbox

    Checkbox

    4
  • Hotkey Button

    Hotkey Button

  • Pin Input

    Pin Input

  • Card

    Card

  • Bar Chart

    Bar Chart

More in Forms

View all
  • Premium Auth

    Premium Auth

    577
  • Login 1

    Login 1

    68
  • Contact Card

    Contact Card

    1.1K
  • Form

    Form

    18
  • Login Card

    Login Card

    36
  • Login 2

    Login 2

    15
  • Change Password Form

    Change Password Form

    11
  • Form

    Form

    3