Measured entry

neobrutalism-switch

switchbrutalism

A client-side React toggle built on the Radix Switch primitive and distributed as a shadcn registry TSX file. Its neobrutalist appearance comes from Tailwind utility classes and project theme tokens, while its class merging relies on the local cn helper backed by clsx and tailwind-merge.

Specimen
Harness screenshot of neobrutalism-switch at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of neobrutalism-switch at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of neobrutalism-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 neobrutalism-switch
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical0
Axe serious1
Axe moderate0
Axe minor0
Gzip marginal34.5 KB (100.0 KB build, 65.5 KB baseline)
Bare modeOK
Provider requiredNO
Demo usedwritten from the component source API

Verdict

The component builds and mounts cleanly, stays contained across the tested layouts, and offers a sensible Radix foundation. Adopt it when the visual language fits, but review and adjust the theme colors before release because the tested presentation has a serious contrast issue.

Use it if

  • Your interface already uses the matching neobrutalist Tailwind theme tokens.
  • You want Radix-managed switch behavior with controlled, uncontrolled, and disabled states.
  • You are comfortable supplying visible labels outside the switch component.

Skip it if

  • Your project does not use Tailwind or cannot adopt the required custom color tokens.
  • You need a component whose default theme has already cleared a strict contrast review.
  • You want a self-contained field that renders its own label, help text, or validation message.

Install

Installation record for neobrutalism-switch
Declared dependencies@radix-ui/react-switch, clsx, tailwind-merge
Missing on installnone
Bare installbuilds and mounts without the shadcn-style helpers
Providerno provider required in the harness

In a non-shadcn project, add the Radix Switch package, Tailwind, clsx, and tailwind-merge. Provide the cn utility, configure the border, main, secondary-background, and ring theme tokens, and preserve client-component handling where your framework requires it.

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.