Animate a button label from Copy to Copied and back automatically.
Add a rolling number or status transition to a dashboard counter.
Drop the effect into a React or Vue component with the included wrappers.
Style the roll with color, direction, and bounce options for a custom feel.
| danilaa1/slot-text | zigabratun/umbrella-hwid-tool | openclaw/clawpatch | |
|---|---|---|---|
| Stars | 421 | 426 | 412 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 1/5 | 3/5 | 3/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
Single npm install plus a one-time CSS import, React and Vue wrappers are optional peer dependencies.
slot-text is a small JavaScript library that animates text labels with a rolling or slot-machine effect: when the text changes, the old characters slide out and the new characters slide in, one by one. It is designed for short UI labels like buttons, status indicators, or counters where a quick animated transition feels more polished than an instant swap. The library has no dependencies and works in plain JavaScript, React, and Vue. You install it from npm, import a CSS file once, and then attach it to any HTML element. Two main methods cover the common cases: set() changes the text and leaves the new value in place permanently, while flash() temporarily swaps the text and then rolls it back to the original after a short delay. The flash method handles rapid repeated clicks gracefully by restarting the revert timer instead of stacking up extra animations. Several options let you control how the animation looks and feels. You can choose whether characters roll upward or downward, adjust the timing between characters and the duration of each character's movement, tune a bounce overshoot, and assign a color to the incoming characters. A built-in helper called chromatic() cycles through rainbow hues across the characters if you want a colorful effect. The library animates each character in its own measured cell using the element's actual font metrics, so it stays accurate across fonts. The trade-off is that tight letter-pair spacing (kerning) and typographic ligatures are lost because each character sits in its own slot. The authors note this is invisible at typical label sizes and that the library is best suited for short text: labels, numbers, statuses, and button states like "Copy" rolling to "Copied" and back. React and Vue components are included as optional add-ons. Plain JavaScript users do not need either.
A tiny dependency-free JavaScript library that animates short text labels with a rolling, slot-machine style transition for buttons and status text.
Mainly TypeScript. The stack also includes TypeScript, JavaScript, React.
No license information is provided in this repository.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.