UIComponentsReact
A set of options of which the reader picks one.
Built on the headless Radio Group.See its API in Docs
Rendered by React 19.3.1
Installation
npx shadcn@4.23.0 add https://hamur.dev/r/react/radio-group.jsonIt also adds utils. The app needs its setup first: Installation.
Usage
Each RadioGroupItem has a value; the group holds the chosen one in value or defaultValue. Arrow keys move between items, as in the headless Radio Group.
import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group'Examples
API reference
The styled parts pass every prop to the headless part they wrap and add classes. The props, data attributes and keyboard are on Radio Group's API reference.