Measured entry

tripled-elastic-switch-shadcnui

switchminimal-flatmotion on file

A client-side React toggle that keeps its own boolean state and animates a sliding thumb with Framer Motion. It ships as a shadcn registry component, but its source is a single component styled with Tailwind utilities and an accent theme token.

Specimen
Motion capture of the mounted demo, recorded by the harness. No audio track.
Harness screenshot of tripled-elastic-switch-shadcnui at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of tripled-elastic-switch-shadcnui at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of tripled-elastic-switch-shadcnui 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 tripled-elastic-switch-shadcnui
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical1
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal60.8 KB (126.2 KB build, 65.4 KB baseline)
Bare modeOK
Provider requiredNO
Demo usedwritten from the component source API

Verdict

A tidy elastic interaction with no mounting or responsive overflow trouble, but it is a demo-level toggle rather than a reusable form control. The unnamed button is a critical accessibility defect, and the fixed internal state limits real application use until the API is expanded.

Use it if

  • You want a compact animated toggle for a low-complexity local preference.
  • Your app already uses Tailwind utilities and Framer Motion.
  • You are prepared to add an accessible name and expose the toggle state.

Skip it if

  • You need a production-ready accessible switch without modifying the source.
  • You need a controlled value, change callback, disabled state, or form integration.
  • You want to avoid adding Framer Motion for a small interaction.
  • Your design system does not provide the accent color token or compatible Tailwind classes.

Install

Installation record for tripled-elastic-switch-shadcnui
Declared dependenciesframer-motion, react
Missing on installnone
Bare installbuilds and mounts without the shadcn-style helpers
Providerno provider required in the harness

A non-shadcn project must add React, Framer Motion, Tailwind utility processing, and an accent color definition. It should also supply an accessible label, expose checked state with switch semantics, and refactor the internal state into value and change props when application code must control 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.

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.