Measured entry
8bitcn-toggle
A client-side pixel-art pressed-state toggle distributed as a shadcn registry component. It wraps the shadcn Toggle primitive, styles it with Tailwind classes and class-variance-authority, uses the project cn helper, and imports a retro stylesheet that fetches the Press Start 2P font from Google Fonts.



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 | 32.7 KB (98.2 KB build, 65.5 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 847ms error during build: [vite]: Rollup failed to resolve import "class-variance-authority" from "<sandbox>re-27737cceac36/src/cut/components/ui/8bit/toggle.tsx".
Verdict
A sound choice for deliberately retro settings panels. It builds and mounts cleanly, stays contained across the tested layouts, and exposes the expected toggle semantics. Its main cost is coupling to shadcn conventions and an externally loaded display font.
Use it if
- You need a compact on or off control for settings such as sound, music, or display modes.
- Your interface already uses shadcn components, Tailwind theme tokens, and path aliases.
- A rigid pixel-art treatment fits the surrounding visual language.
- You want Radix toggle behavior while retaining control over labels and controlled state.
Skip it if
- Your product uses a conventional switch pattern and users may misread a pressed button as an action.
- Your design system relies on rounded, neutral controls rather than a retro pixel style.
- External font requests are prohibited or the Press Start 2P typeface is unsuitable for localization.
- You do not want to maintain shadcn aliases, theme tokens, and a shared cn utility.
Install
| Declared dependencies | radix-ui, clsx, tailwind-merge |
|---|---|
| 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 the Radix toggle primitive, class-variance-authority, clsx, and tailwind-merge; provide a cn helper; configure the component path aliases and Tailwind theme tokens; add the base shadcn Toggle; and include the retro stylesheet or replace its Google Fonts import with a locally hosted font.
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/TheOrcDev/8bitcn-uiAlternatives
Other published entries for the switch pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.
- neu-toggleneumorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 17.8KB
- Bare
- pass
- Prov
- NO
- clay-toggleclaymorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 18.2KB
- Bare
- pass
- Prov
- NO
- ruixen-scrub-datetimeunclassified
- Renders
- YES
- A11y
- 0
- Gzip
- 22.2KB
- Bare
- pass
- Prov
- NO
- shadcn-switchunclassified
- Renders
- YES
- A11y
- 0
- Gzip
- 34.4KB
- Bare
- pass
- Prov
- NO
- hextaui-switchminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 34.5KB
- Bare
- pass
- Prov
- NO
- hextaui-tabsminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 39.0KB
- Bare
- pass
- Prov
- NO