Measured entry

ruixen-button-badge

buttonliquid-glassmotion on file

A client-side React button with a floating badge, spring-based hover, press, and badge transitions, plus an optional generated click sound. It ships as a shadcn registry component but is self-contained apart from React and Motion, using injected theme CSS and inline styles rather than shared UI primitives.

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

Verdict

A focused, working badge button with responsive rendering and no provider requirement. It is easy to transplant, but the contrast issue, absent visible focus treatment, narrow prop API, and default sound make it a starting point that should be hardened before production use.

Use it if

  • You need a compact notification or inbox action whose badge value changes in place.
  • Your React app already uses Motion and can accept a client-only component.
  • You want the liquid-glass styling to work without a theme provider or utility CSS setup.

Skip it if

  • You need the supplied colors to pass accessibility checks without modification, since the tested palette has a serious contrast failure.
  • You need standard button props such as disabled, type, aria attributes, className, or keyboard focus styling without extending the component.
  • You do not want an interaction sound enabled by default or cannot use the browser Web Audio API.
  • You want to avoid adding Motion for a single animated control.

Install

Installation record for ruixen-button-badge
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, add Motion, copy the component into your source tree, and ensure it runs as a client component. React and browser Web Audio support are assumed. No utility CSS package or context provider is required; adjust the injected color variables and extend the props for accessibility and form use.

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