byDefaultHuman
Components

Radio

Hand-drawn radio buttons with a filled inner circle when selected.

Installation

package manager
npx shadcn add https://bydefaulthuman.fun/r/radio.json

Props

PropTypeDefaultDescription
className
string
—
Additional Tailwind classes applied to the component.
defaultValue
string
—
Initial uncontrolled value.
name*
string
—
Controls the `name` behavior.
onChange
(value: string) => void
—
Callback fired when the value changes.
options*
RadioOption[]
—
Options rendered by the component.
orientation
"vertical" | "horizontal"
"vertical"
Controls the component layout direction.
theme
CrumbleTheme
—
Overrides the global Crumble theme for this instance.
value
string
—
Controlled value for the component.

Horizontal layout

With disabled option

Accessibility

RadioGroup renders native radio inputs, so arrow-key navigation and form behavior follow browser conventions. Use a shared name and a visible group label when the choice set needs extra context.

Examples

import { RadioGroup } from "@/components/crumble/ui/radio";

<RadioGroup
  name="plan"
  defaultValue="monthly"
  options={[
    { value: "monthly", label: "Monthly" },
    { value: "yearly", label: "Yearly" },
    { value: "lifetime", label: "Lifetime" },
  ]}
/>;