Measured entry

shadcn-radio-group

radio-groupunclassified

A client-side React wrapper around Radix UI radio primitives, shipped as TypeScript source with Tailwind utility classes. It uses a Lucide circle for the selected state and expects the shadcn cn helper, whose usual implementation relies on clsx and tailwind-merge.

Specimen
Harness screenshot of shadcn-radio-group at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-radio-group at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-radio-group at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

Measured

Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.

Harness measurements recorded for shadcn-radio-group
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal40.1 KB (105.6 KB build, 65.5 KB baseline)
Bare modeFAIL
Provider requiredNO
Demo usedwritten from the component source API

What the harness recorded

BARE BUILD

✗ Build failed in 779ms
error during build:
[vite]: Rollup failed to resolve import "lucide-react" from "<sandbox>re-cdd641a8611b/src/cut/components/ui/radio-group.tsx".

Verdict

A dependable choice for an existing shadcn stack. It behaved cleanly in the harness and needs no provider, but its dependency cost is high for such a small control and the source assumes shadcn-flavored styling conventions.

Use it if

  • You need an accessible single-choice control that supports keyboard interaction and disabled or invalid states.
  • Your app already uses shadcn conventions, Tailwind theme tokens, and the shared cn utility.
  • You want a small composable primitive that leaves labels, descriptions, and layout to the caller.

Skip it if

  • You want a dependency-light native radio input and do not need Radix behavior.
  • Your project does not use Tailwind and you do not want to translate the utility classes into local CSS.
  • You need a complete field component with labels, validation messages, and form-library wiring included.

Install

Installation record for shadcn-radio-group
Declared dependenciesradix-ui, clsx, tailwind-merge
Missing on installnone
Bare installfails once the shadcn-style helpers are removed, so it needs that setup
Providerno provider required in the harness

In a non-shadcn project, add Radix UI and Lucide React, provide a cn class-merging helper backed by clsx and tailwind-merge, configure Tailwind, and define equivalents for the theme tokens used by the border, ring, primary, input, and destructive classes. Replace the alias import with your local utility path.

Source and credit

This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.

Author repository

github.com/shadcn-ui/ui
License
MIT
Record published
2026-08-16

Alternatives

Other published entries for the radio-group pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.