Installation
npx shadcn@latest add @iconiq/radiogroupProps
Radio option shape
3 props
Options are plain objects consumed by the RadioGroup component.
value
stringRequired
Unique identifier for the option and the selected value reported through onChange.
label
stringRequired
Primary line shown for the option.
description
stringOptional secondary line shown below the label with reduced emphasis.
RadioGroup
4 props
Single-choice selector that can run uncontrolled from local state or sync to a controlled value prop.
options
{ value: string; label: string; description?: string }[]Required
Available choices in display order.
value
stringControlled selected value. If omitted, the component starts from the first option's value and manages selection locally.
onChange
(value: string) => voidCalled whenever a user selects a row.
className
stringMerged onto the root wrapper for spacing or sizing adjustments.
Notes
If options is empty, the uncontrolled initial state becomes undefined and no row is selected.
Controlled updates are synced through an effect that watches the value prop.