Radio groupshadcn
One choice from a few, all visible.
Inputs- Install
- npx shadcn add radio-group
- Import from
- @/components/ui/radio-group
- Guidance
- draft · v0.1.0
Examples
As installed from shadcn – rendering in jsp-ds tokens through the bridge.
Guidance
When to use
- One choice from two to about five options that people should see side by side.
When not to use
- More options – use Select.
- Several choices – use checkboxes.
Rules
- In a FieldSet with a legend that asks the question.
- Pre-select the most likely option when there is one; otherwise none.
- Arrow keys move between options; Tab leaves the group. Radix handles this.
Install
Terminal
npx shadcn add radio-groupImport
import { RadioGroup } from "@/components/ui/radio-group"From shadcn’s own registry. Don’t edit the installed file – jsp-ds styles it through the bridge, and fixes go in styles/overrides.css with an issue.