Measured entry

ruixen-magnetic-tabs

selectglassmorphismmotion on file

A client-side React tab switcher with a spring-following glass pill, animated content transitions, and an optional synthesized click sound. It ships as a single shadcn registry TSX file with inline styles, depends on Motion, and uses browser AudioContext and ResizeObserver APIs.

Specimen
Motion capture of the mounted demo, recorded by the harness. No audio track.
Harness screenshot of ruixen-magnetic-tabs at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of ruixen-magnetic-tabs at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of ruixen-magnetic-tabs 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 ruixen-magnetic-tabs
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical0
Axe serious1
Axe moderate0
Axe minor0
Gzip marginal61.6 KB (127.0 KB build, 65.4 KB baseline)
Bare modeOK
Provider requiredNO
Demo usedwritten from the component source API

Verdict

A polished interaction that builds and mounts on its own, with useful configuration and no provider requirement. Adopt it only if you are prepared to fix contrast and add proper tab semantics and keyboard behavior; the current button row is visually convincing but not a complete accessible tab pattern.

Use it if

  • You want compact tabs whose indicator follows hover before settling on the selected item.
  • Your interface can benefit from animated panel changes and an optional audible selection cue.
  • You prefer a self-contained component whose labels, content, callback, sound, and outer class are configurable.

Skip it if

  • You need accessible tab semantics, arrow-key navigation, or managed focus without extending the component.
  • Your design system cannot accept the measured color-contrast issue in the supplied theme values.
  • You want a lightweight selector without adding Motion or browser audio behavior.
  • Your tab list may be wider than the viewport and needs built-in wrapping, scrolling, or overflow handling.

Install

Installation record for ruixen-magnetic-tabs
Declared dependenciesmotion
Missing on installnone
Bare installbuilds and mounts without the shadcn-style helpers
Providerno provider required in the harness

In a non-shadcn React project, copy the client component into your source tree and install Motion so the motion/react imports resolve. Ensure the component runs only in the browser, keep React available, and add your own accessible tab roles, keyboard handling, focus treatment, and contrast-adjusted theme values.

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 select pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.