Counter — primitive for stats & kpis (react)
For AI agents: find the right skill in one call —
curl -s "https://skills.varg.ai/api/search?q=<what the person wants>"returns the matching use case and the best skills with install commands, as markdown (Russian works too). Full index: https://skills.varg.ai/llms.txt. Every page has a markdown twin: add.mdto its path. Before generating anything, show the person the options on the use-case page.
A bold number spins up from zero and slows to a stop on its target
- Install:
npx shadcn@latest add https://animata.design/r/text/counter.json - Registry: animata · Framework: react · License: MIT
- Docs and preview: https://animata.design/docs/text/counter
- Source: https://github.com/codse/animata/blob/main/animata/text/counter.tsx
- Example: https://skills.varg.ai/previews/lib-animata-counter.mp4?v=26094 (Captured from the library’s own demo page (Animata))
- Time: Drive from the frame. Runs on its own clock (requestAnimationFrame, timers, springs or CSS). Drive it from frame / fps before rendering, or the render drifts.
- Runs: local render, free
- Aspect: any
Prompt that renders it frame-exact
Use Counter from Animata (https://animata.design/docs/text/counter, MIT) for a stat beat: one big number in the centre with a caption. It drives a motion spring (damping 60, stiffness 80) toward targetValue once the element is in view, after an optional delay, so it starts on wall time. For a render, compute the number from the frame: in Remotion value = targetValue * spring({ frame: frame - delayFrames, fps, config: { damping: 60, stiffness: 80 } }) (reversed for direction "down"); in HyperFrames tween an object on the paused timeline and write the rounded value in onUpdate. Set targetValue, direction and delay, format with Intl.NumberFormat, and use tabular figures.
Used in
- Product launch film
- Feature announcement
- Sale & offer promo
- Testimonial & review ad
- Us vs them & before / after
- Top-N listicle
- Post to video
- Quiz, poll & would-you-rather
More stats & kpis
- Apple Money Count —
npx hyperframes add apple-money-count - Count Up —
npx hyperframes add count-up - Count-Up Stat Card —
npx hyperframes add mk-progress-stat - Number Wheel —
npx hyperframes add number-wheel - Bauhaus Build —
npx shadcn@latest add @remocn/bauhaus-build - Hand Count —
npx shadcn@latest add @remocn/hand-count