klyv-ui

Radio

Forms

About

A native-feeling radio input with the selected dial drawn on it, used as the single control inside a radio group for picking one option among several.

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";

export default function RadioStatesDemo() {
  return (
    <div className="flex w-full items-center justify-center bg-background p-10">
      <div className="flex w-full max-w-md flex-wrap items-center justify-center gap-8 rounded-xl border border-border bg-card p-8 shadow-sm">
        <label className="flex flex-col items-center gap-2">
          <Radio name="state-unselected" />
          <span className="text-xs font-medium text-muted-foreground">
            unselected
          </span>
        </label>
        <label className="flex flex-col items-center gap-2">
          <Radio name="state-selected" defaultChecked />
          <span className="text-xs font-medium text-muted-foreground">
            selected
          </span>
        </label>
        <label className="flex flex-col items-center gap-2">
          <Radio name="state-invalid" invalid />
          <span className="text-xs font-medium text-muted-foreground">
            invalid
          </span>
        </label>
        <label className="flex flex-col items-center gap-2">
          <Radio name="state-disabled" disabled />
          <span className="text-xs font-medium text-muted-foreground">
            disabled
          </span>
        </label>
        <label className="flex flex-col items-center gap-2">
          <Radio name="state-disabled-selected" disabled defaultChecked />
          <span className="text-xs font-medium text-muted-foreground">
            disabled + selected
          </span>
        </label>
      </div>
    </div>
  );
}

More by klyv-ui

View all
  • Gantt Chart

    Gantt Chart

    68
  • Klyv Animated Beam

    Klyv Animated Beam

    56
  • Shader Canvas

    Shader Canvas

    54
  • Pareto Chart

    Pareto Chart

    49
  • Fluid Canvas

    Fluid Canvas

    29
  • Sunburst Chart

    Sunburst Chart

    28
  • Gooey Loader

    Gooey Loader

    26
  • Morphing Text

    Morphing Text

    23

More in Forms

View all
  • Premium Auth

    Premium Auth

    533
  • Contact Card

    Contact Card

    1K
  • Book A Demo 1

    Book A Demo 1

    77
  • Card Studio

    Card Studio

    43
  • Login 2

    Login 2

    8
  • Login Card

    Login Card

    29
  • Form

    Form

    17
  • Split Sign In Form

    Split Sign In Form

    76