Radio Group

RadioGroup and RadioGroupItem for picking one option: the filled dot travels from the old choice to the new one through a shared layoutId, items dip when pressed, groups run vertically or horizontally, and every item gets a 44px touch target.

Preview

Radio Group preview width

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @karaui/radio
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

RadioGroup

value?
string
—
defaultValue?
string
onValueChange?
((value: string) => void)
—
className?
string
—
orientation?
"horizontal" | "vertical"
vertical

RadioGroupItem

value
string
—
label?
string
—
disabled?
boolean
—
className?
string
—
id?
string
—

Updated