Radio Group
Live example
Radio Group
Installation
npx shadcn@latest add https://hextech-ui.vercel.app/r/radio.jsonAPI reference
These are the main Radio Group options. See the exported TypeScript types for inherited native or primitive props.
| Prop | Type | Default |
|---|---|---|
value / defaultValue | string (group) | — |
value | string (radio) | — |
onValueChange | (value, details) => void | — |
Radio.children | managed indicator/track; use an external label | not accepted |
Group selection
Set value and onValueChange on RadioGroup for controlled selection, or defaultValue for local state. Each Radio needs a distinct value and a visible label. Give the group an accessible name; arrow keys move between options.