slot-text
1 kB dependency-free slot-machine text roll, with adapters for 5 frameworks
slot-text animates a text label by rolling characters or whole words into place, like a split-flap or slot machine, with spring easing and per-segment control. It has no dependencies, weighs about 1 kB of CSS, and ships adapters for vanilla JS, React, Vue, Solid and Svelte from one npm package. Interrupts are handled safely, so rapid repeated updates do not queue up or tear. textmotion.dev is its documentation site and interactive lab for tuning the options before you copy them.
npm i slot-textPrefer this over a hand-rolled framer-motion number roll when the target is a small label — a live counter, a status word, a price that changes — because it is framework-agnostic and costs about 1 kB instead of an animation runtime. The peer deps are optional per adapter, so import from the adapter path that matches the host framework rather than the root. Its interrupt handling is the reason to pick it: values that update faster than the animation will not stack, which is exactly where naive implementations break.
Why it is here. Nearly a thousand stars in two months for a one-effect library, which is a fair signal that the interrupt-safe, multi-framework packaging solved a real annoyance.
- adapters for vanilla, React, Vue, Solid and Svelte
- zero dependencies
- ~1 kB of CSS
- spam-safe interrupt handling
- character or whole-word roll
Verified 2026-08-15. HTTP 200. https://textmotion.dev/ (features, adapters, install command, v0.3.4, interactive lab), page source scraped for outbound links to github.com/Danilaa1/slot-text and npmjs.com/package/slot-text, registry.npmjs.org/slot-text (MIT, optional peers react/vue/solid/svelte, zero runtime deps), GitHub API for stars/licence/last push








