Skip to content
Components / Controls

Radio group

One choice from a short list that stays visible.

@fabrials/ui
Loading state

Installation

  1. Import the control from @fabrials/ui, after setting the app up.

    TypeScript
    import { RadioGroup, RadioGroupItem, Radio } from "@fabrials/ui";
  2. Or install it under shadcn's name, so code that imports @/components/ui/radio-group gets this control. See shims.

    npx shadcn@latest add @fabrials/radio-group

API reference

Prop / exportTypeDescription
defaultValue / valuestringThe selected option.
onValueChange(value) => voidCalled when the choice changes.
aria-labelstringNames 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.