azabroflovski

Radio

Forms 4

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

    8
  • Dialog

    Dialog

    5
  • Checkbox

    Checkbox

    5
  • Hotkey Button

    Hotkey Button

    2
  • Pin Input

    Pin Input

    1
  • Card

    Card

  • Bar Chart

    Bar Chart

More in Forms

View all
  • Form

    Form

    10
  • Contact Form

    Contact Form

    33
  • Premium Auth

    Premium Auth

    616
  • Paper Plane

    Paper Plane

    113
  • Contact Card

    Contact Card

    1.1K
  • Form

    Form

    18
  • Onboarding Stepper

    Onboarding Stepper

    14
  • Input

    Input

    14