Skip to main content
rule CX Codex

counting-dynamic-scale — Claude Code rule: counter and font scaling

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

AGPL-3.0 ★ 78,316 updated 2026-10-24

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/counting-dynamic-scale.md
Open on GitHub

What counting-dynamic-scale 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.

What it helps with

  • 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 for the agent

  • 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

How to install counting-dynamic-scale

Manually: put the files in place

.claude/rules/counting-dynamic-scale.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about counting-dynamic-scale

How to install counting-dynamic-scale in Claude Code?

Add the rule markdown file to your project repository at .claude/rules/counting-dynamic-scale.md.

What does counting-dynamic-scale do?

It structures a GSAP animation that scales up font size alongside an incrementing number to communicate visual weight.

Why is tabular-nums mandatory for this counter?

Proportional numbers vary in width, so skipping tabular-nums makes the container twitch horizontally as digits cycle rapidly.

Similar IDE rules

All IDE rules for Frontend and UI →

From the same set101

The whole set →
config Covers how ManimGL reads custom_config.yml: output folders, camera and window options, styles. An agent edits the right keys instead of guessing. CX Codex +1 ★ 78,316repo stars provider-refresh-oct23 provider-refresh-oct23 configures strict API contracts and routing logic for multimedia generation models. Keeps agent calls aligned with provider updates across speech, image, and video backends. CX Codex +1 ★ 78,316repo stars 3d-page-scroll The 3d-page-scroll rule turns a webpage into a tilted 3D card and scrolls its content to chosen sections. It fits product scenes and long page layouts. CX Codex +1 ★ 78,316repo stars gsap-effects gsap-effects — a rule with drop-in GSAP patterns for HyperFrames: typewriter text and an audio visualizer driven by the timeline. Useful when the agent renders videos frame by frame with deterministic output. CX Codex +1 ★ 78,316repo stars styling Rule for styling mobjects in ManimGL: fill, stroke, opacity, and visual effects. Use it when building animations and want consistent, reusable styling across objects. CX Codex +1 ★ 78,316repo stars kling-official kling-official teaches the agent to drive Kling's own API inside OpenMontage: video, images, speech, avatars and lip sync. CX Codex +1 ★ 78,316repo stars hyperframes-cli hyperframes-cli guides the HyperFrames video build loop, from composition validation and timeline inspection to AWS Lambda rendering. CX Codex +1 ★ 78,316repo stars synthetic-screen-recording The synthetic-screen-recording skill guides synthetic terminal demos in Remotion with TerminalScene. Use it when the command sequence and output can be authored ahead of time. CX Codex +1 ★ 78,316repo stars

Project sponsors

Companies that keep this analytics open