Measured entry

8bitcn-toggle

switchskeuomorphism

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.

Specimen
Harness screenshot of 8bitcn-toggle at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of 8bitcn-toggle at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of 8bitcn-toggle 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 8bitcn-toggle
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal32.7 KB (98.2 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 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

Installation record for 8bitcn-toggle
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 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.

License
MIT
Record published
2026-08-16

Alternatives

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.