Installation
npx shadcn@latest add @iconiq/r-radio-groupProps
Radio option shape
Options are plain objects consumed by the RadioGroup component.
valuestringRequired
labelstringRequired
descriptionstringRadioGroup
Single-choice selector with the same Iconiq row motion layered over Radix UI primitives.
options{ value: string; label: string; description?: string }[]Required
defaultValuestringvaluestringonChange(value: string) => voidnamestringlayoutIdstring"aria-label"string"aria-labelledby"stringclassNamestringIf options is empty, the component returns null rather than rendering an empty radiogroup.
In uncontrolled mode, the selected value normalizes back to the first available option if the current selection disappears from the options array.
Motion and accessibility
The component wraps native radio inputs in an animated label shell so keyboard, form, and screen-reader behavior stay intact.
Built on Radix RadioGroup.Root and RadioGroup.Item while preserving the same staggered row entrance, shared layout highlight, and spring-loaded ring and dot animation.
The root keeps radiogroup semantics and each input supports Arrow keys plus Home and End navigation with a single tab stop inside the set.
Each instance gets its own highlight layoutId by default, so separate groups on the same page do not animate across each other unless you opt into a shared layoutId.
Registry bundle
Install the exact registry entry shown on the right when you want the component file and its declared runtime dependencies together.
Dependencies: @radix-ui/react-radio-group, motion.
Installs a Radix radio group with the same options, value, defaultValue, onChange, name, and layoutId API as the Base UI version.
Keeps the exact same row entrance, active highlight, and ring-and-dot motion used by the original radio group component.
The generated registry file is /r/r-radio-group.json.