# counting-dynamic-scale

counting-dynamic-scale animates numeric counters while growing font size via GSAP. Useful for dramatizing stats and metrics in hero sections.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 78316 repo stars
- Author: calesthio
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/calesthio/OpenMontage/tree/HEAD/.agents/skills/hyperframes-animation/rules/counting-dynamic-scale.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/counting-dynamic-scale

## What it does

This rule specifies an animation pattern where a numeric counter advances while its font size scales upward in tandem. Both actions run within a single GSAP timeline using a proxy state object inside `onUpdate`, updating text content and inline font size every frame without drift.

The layout structure contains a fixed-width wrapper, an animated suffix element, and a label. The rule schedules the suffix entrance right after the number stops rolling, while the accompanying label fades in halfway through the sequence. Deceleration curves like `power2.out` or `power3.out` are preferred for natural braking.

Without `font-variant-numeric: tabular-nums`, changing digit widths cause aggressive horizontal jitter during the run. That makes tabular numbers mandatory for this pattern, along with having GSAP available in the target page.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/counting-dynamic-scale.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/counting-dynamic-scale.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/counting-dynamic-scale.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/counting-dynamic-scale.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/counting-dynamic-scale.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/calesthio/OpenMontage/tree/HEAD/.agents/skills/hyperframes-animation/rules/counting-dynamic-scale.md

## When to use it
- synchronize numeric increments with scaling typography
- eliminate layout shifts when digits roll during count animations
- choreograph metric labels and suffixes alongside number tweens

## Example prompts
- Build a landing page hero counter where font size scales up dynamically with the number
- Set up three coordinated metric counters using the counting-dynamic-scale rule

## Similar
- [typography-scale](https://affpapa.org/en/nevibecode/skills/typography-scale.md) — skill · 3100 installs
- [gradient-text-sweep](https://affpapa.org/en/nevibecode/rules/gradient-text-sweep.md) — rule · ★ 328 repo stars
- [frontend-developer](https://affpapa.org/en/nevibecode/skills/dylantarre-frontend-developer.md) — skill · 633 installs
- [modular-scale-typography](https://affpapa.org/en/nevibecode/skills/modular-scale-typography.md) — skill · 1100 installs
- [interface-kit](https://affpapa.org/en/nevibecode/skills/interface-kit.md) — skill · 2400 installs
- [typography-scale-builder](https://affpapa.org/en/nevibecode/skills/typography-scale-builder.md) — skill · 116 installs

From the same set: [calesthio/openmontage](https://affpapa.org/en/nevibecode/by/calesthio/openmontage.md) — 101 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
