Measured entry

8bitcn-switch

switchskeuomorphism

A client-side, pixel-styled toggle built on Radix UI's Switch primitive. It ships as a shadcn registry component with Tailwind utility classes, imports the project's cn helper, and includes an optional retro stylesheet that loads Press Start 2P from Google Fonts.

Specimen
Harness screenshot of 8bitcn-switch at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of 8bitcn-switch at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of 8bitcn-switch 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-switch
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical1
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal34.2 KB (99.6 KB build, 65.4 KB baseline)
Bare modeFAIL
Provider requiredNO
Demo usedwritten from the component source API

What the harness recorded

BARE BUILD

✗ Build failed in 40.87s
error during build:
[vite:load-fallback] Could not load <sandbox>/src/lib/utils (imported by src/cut/components/ui/8bit/switch.tsx): ENOENT: no such file or directory, open '<sandbox>/src/lib/utils'

Verdict

Use it for deliberate pixel-art interfaces, but not as-is: the sample mounts in the configured harness yet exposes an unnamed switch. It needs a shadcn-style setup, and consumers must provide an accessible label.

Use it if

  • You need a compact toggle that fits an intentionally retro or pixel-art interface.
  • Your app already has shadcn-style aliases, theme tokens, Tailwind utilities, and the Radix switch primitive.
  • You can provide a visible label or accessible name at each usage site.

Skip it if

  • You need a drop-in switch for a project without shadcn-style utilities and path aliases.
  • You require an accessible default that supplies its own discernible name.
  • Your design system calls for a conventional rounded switch rather than a hard-edged pixel frame.
  • Your policy forbids externally hosted fonts and you intend to use the included retro stylesheet unchanged.

Install

Installation record for 8bitcn-switch
Declared dependenciesnone declared
Missing on installnone
Bare installfails once the shadcn-style helpers are removed, so it needs that setup
Providerno provider required in the harness

Add the Radix UI switch package, Tailwind CSS with the expected theme tokens and state variants, an @ alias resolving to a lib/utils cn helper, and import the retro stylesheet if you want its font utility. Provide a visible label or aria-label wherever the switch is used.

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-14

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.