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.



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.
| Build | OK |
|---|---|
| Mount | OK |
| Console errors | 0 |
| Uncaught page errors | 0 |
| Horizontal overflow | clean at 375, 768, 1440 |
| Axe critical | 0 |
| Axe serious | 1 |
| Axe moderate | 0 |
| Axe minor | 0 |
| Gzip marginal | 63.2 KB (128.7 KB build, 65.5 KB baseline) |
| Bare mode | OK |
| Provider required | NO |
| Demo used | written 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
| Declared dependencies | motion |
|---|---|
| Missing on install | none |
| Bare install | builds and mounts without the shadcn-style helpers |
| Provider | no 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.
Author repository
github.com/ruixenui/ruixen.comAlternatives
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.
- neu-buttonneumorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 17.8KB
- Bare
- pass
- Prov
- NO
- clay-buttonclaymorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 18.2KB
- Bare
- pass
- Prov
- NO
- tripled-animated-radio-shadcnuiminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 58.2KB
- Bare
- pass
- Prov
- NO
- ruixen-glow-link-buttonliquid-glass
- Renders
- YES
- A11y
- 0
- Gzip
- 58.9KB
- Bare
- pass
- Prov
- NO
- tripled-mood-gradient-button-shadcnuigradient-glow
- Renders
- YES
- A11y
- 0
- Gzip
- 59.2KB
- Bare
- pass
- Prov
- NO
- ruixen-glass-ai-cardliquid-glass
- Renders
- YES
- A11y
- 0
- Gzip
- 59.5KB
- Bare
- pass
- Prov
- NO