Radio
Native single-select rows with an animated dot, keyboard focus halo, and card composition — free screen-reader and form semantics included.
Installation#
pnpm dlx shadcn@latest add @davinciui/radioUsage#
Composition: RadioGroup wraps Radio items sharing the same name. Native inputs give arrow-key navigation, screen-reader names, and form submission free — Tab to the group and every dot shows a focus halo.
Composition#
Use the following composition to build a Radio:
RadioGroup
└── RadioAPI Reference#
| Prop | Type | Default |
|---|---|---|
RadioGroupContainer with role radiogroup. | Component | — |
RadioLabel-wrapped native input. Value doubles as the label text; children append. | Component | — |
nameGroup name (shared across radios). | string | — |
valueValue of the radio. | string | — |
disabledDisables the radio. | boolean | false |
invalidMarks as invalid. | boolean | false |
classNameAdditional CSS classes. | string | — |
Accessibility#
Each item wraps a native radio in its label inside a role radiogroup, so arrow keys, naming, and form submission work natively. Focus-visible styling sits on the visual dot; invalid is set on the group and label, not the input.
Motion#
The checked dot animates scale from 50 to 100 percent and fades opacity, while border and background colors transition over 150ms ease-out. There are no timing props; motion-reduce transition-none makes the state change instant.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

