Components / Controls
Radio group
One choice from a short list that stays visible.
@fabrials/ui
Installation
Import the control from
@fabrials/ui, after setting the app up.TypeScript import { RadioGroup, RadioGroupItem, Radio } from "@fabrials/ui";Or install it under shadcn's name, so code that imports
@/components/ui/radio-groupgets this control. See shims.npx shadcn@latest add @fabrials/radio-group
API reference
| Prop / export | Type | Description |
|---|---|---|
defaultValue / value | string | The selected option. |
onValueChange | (value) => void | Called when the choice changes. |
aria-label | string | Names the group when there is no visible legend. |
Behavior
Arrow keys move between options. RadioGroupItem is shadcn's name for Radio.
Accessibility
Keyboard and contrast
Keep visible labels, keyboard focus and status announcements when customizing. These components inherit your theme; maintain sufficient contrast in both color modes. The preview is keyboard operable.