Measured entry
shadcn-button
A source-distributed React button from the shadcn registry, with visual and size variants plus an asChild composition option. It ships as TypeScript to copy into an app, not as a standalone package, and relies on Tailwind theme classes, a local cn helper, class-variance-authority, and the radix-ui Slot primitive.



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.
| Build | OK |
|---|---|
| Mount | OK |
| Console errors | 0 |
| Uncaught page errors | 0 |
| Horizontal overflow | clean at 375, 768, 1440 |
| Axe critical | 0 |
| Axe serious | 0 |
| Axe moderate | 0 |
| Axe minor | 0 |
| Gzip marginal | 13.4 KB (78.0 KB build, 64.6 KB baseline) |
| Bare mode | FAIL |
| Provider required | NO |
| Demo used | written from the component source API |
What the harness recorded
BARE BUILD
✗ Build failed in 851ms error during build: [vite]: Rollup failed to resolve import "class-variance-authority" from "<sandbox>/src/cut/components/ui/button.tsx".
Verdict
A solid fit inside a shadcn-based design system, with useful variants and composition support. It builds and mounts in the prepared harness, but the bare check fails on a missing class-variance-authority import, so it needs a shadcn-style setup rather than direct copying into an unprepared app.
Use it if
- Your app already follows the shadcn component and theme conventions.
- You want a shared button API with preset intent, size, icon, and link treatments.
- You need asChild composition for links or other elements while preserving button styling.
Skip it if
- You need a drop-in package that works without local source, theme tokens, or utility CSS setup.
- Your design system already owns button variants and interaction states.
- You want to avoid radix-ui and class-variance-authority dependencies for a basic control.
Install
| Declared dependencies | radix-ui |
|---|---|
| Missing on install | none |
| Bare install | fails once the shadcn-style helpers are removed, so it needs that setup |
| Provider | no provider required in the harness |
In a non-shadcn project, add React, radix-ui, class-variance-authority, a Tailwind setup that supports the component's utility classes and theme tokens, the local cn class-merging helper, and either the expected path alias or a corrected relative import. Include the supporting global theme styles as well.
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/uiAlternatives
Other published entries for the button pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.
- neu-buttonneumorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 17.8KB
- Bare
- pass
- Prov
- NO
- clay-buttonclaymorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 18.2KB
- Bare
- pass
- Prov
- NO
- tripled-animated-radio-shadcnuiminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 58.2KB
- Bare
- pass
- Prov
- NO
- ruixen-glow-link-buttonliquid-glass
- Renders
- YES
- A11y
- 0
- Gzip
- 58.9KB
- Bare
- pass
- Prov
- NO
- tripled-mood-gradient-button-shadcnuigradient-glow
- Renders
- YES
- A11y
- 0
- Gzip
- 59.2KB
- Bare
- pass
- Prov
- NO
- ruixen-glass-ai-cardliquid-glass
- Renders
- YES
- A11y
- 0
- Gzip
- 59.5KB
- Bare
- pass
- Prov
- NO