Measured entry

clay-toggle

switchclaymorphismfirst party

A self-contained React checkbox styled as a claymorphic toggle, delivered as one JSX component. It supports controlled and uncontrolled state, a label, disabled styling, and change callbacks. It imports only React state, but its appearance depends on Tailwind CSS utilities, including arbitrary values and peer variants.

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

Verdict

A sound, focused toggle for playful Tailwind interfaces. It builds and mounts without extra packages or providers, offers sensible state options, and keeps native input behavior. The fixed visual language makes it a selective design fit rather than a neutral system primitive.

Use it if

  • You need a labeled on-or-off control that works in either controlled or uncontrolled React forms.
  • Your interface already uses Tailwind and can accommodate the component's pastel claymorphism styling.
  • You want a dependency-light toggle with visible keyboard focus and native checkbox behavior.

Skip it if

  • Your project does not use Tailwind and you do not want to translate the utility classes into CSS.
  • Your design system requires theme tokens instead of fixed pastel colors, shadows, and sizing.
  • You require assistive technology to announce a switch role rather than a native checkbox.

Install

Installation record for clay-toggle
Declared dependenciesnone declared
Missing on installnone
Bare installbuilds and mounts without the shadcn-style helpers
Providerno provider required in the harness

First-party component from the sir-originals set. In a non-shadcn React project, add Tailwind CSS and ensure arbitrary values, peer state variants, focus-visible variants, and screen-reader-only utilities are available. Copy the JSX component into the project; no shadcn provider or extra package is required.

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

mrkeyoor/sir-originals
License
MIT
Record published
2026-08-13

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.