Measured entry
reui-badge
A compact React badge primitive shipped as a shadcn registry file. It renders a span or delegates through Radix Slot, with class-variance-authority handling color, size, and radius variants. Its styling assumes Tailwind utilities, project theme tokens, and a local cn helper.



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 | 31.8 KB (97.2 KB build, 65.4 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 1m 40s error during build: [vite:load-fallback] Could not load <sandbox>/src/lib/utils (imported by src/cut/badge.tsx): ENOENT: no such file or directory, open '<sandbox>/src/lib/utils'
Verdict
A solid fit for an existing ReUI or shadcn codebase, with a useful variant set and clean composition. It does not mount bare and needs a shadcn-style setup, including the utility helper, theme tokens, and styling pipeline.
Use it if
- You already use shadcn conventions and want badges that share your theme tokens.
- You need several semantic color treatments, compact sizes, and optional pill corners from one typed API.
- You need composition through Radix Slot so another element can receive the badge styling.
Skip it if
- Your project does not use Tailwind utilities or the expected theme token names.
- You want a dependency-free label and do not need its broad variant matrix.
- You need status announcements or interactive behavior built into the component rather than a styled span.
Install
| Declared dependencies | class-variance-authority, 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 class-variance-authority and Radix UI, provide the cn class-merging helper at the expected alias, configure the Tailwind utilities used by the component, and define its semantic color and ring tokens for light and dark themes.
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/keenthemes/reuiAlternatives
Other published entries for the badge pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.
- neu-badgeneumorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 17.5KB
- Bare
- pass
- Prov
- NO
- clay-badgeclaymorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 17.9KB
- Bare
- pass
- Prov
- NO
- ruixen-load-rippleunclassified
- Renders
- YES
- A11y
- 0
- Gzip
- 17.9KB
- Bare
- pass
- Prov
- NO
- kibo-listminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 42.4KB
- Bare
- pass
- Prov
- NO
- ruixen-blurred-stagger-textunclassified
- Renders
- YES
- A11y
- 0
- Gzip
- 58.1KB
- Bare
- pass
- Prov
- NO
- tripled-auto-revealing-heading-shadcnuiminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 58.3KB
- Bare
- pass
- Prov
- NO