Skip to content

[Animation] Add ease-counter utility — animated number count-up effect using CSS @property #55254

Description

@Nareshkumawat-star

Feature Request
Add a CSS-only animated number counter utility. This is one of the most-requested motion effects for landing pages and dashboards — "0 → 10,000 customers" style count-up animations.

Proposed approach using CSS @Property

@property --ease-count {
  syntax: '<integer>';
  initial-value: 0;
  inherits: false;
}

.ease-counter {
  --ease-count-target: 100;
  --ease-count-duration: 2s;
  counter-reset: ease-count var(--ease-count);
  animation: ease-count-up var(--ease-count-duration) ease-out forwards;
}

.ease-counter::after {
  content: counter(ease-count);
}

@keyframes ease-count-up {
  from { --ease-count: 0; }
  to   { --ease-count: var(--ease-count-target); }
}

Custom properties

  • --ease-count-target — end value (required, set inline)
  • --ease-count-duration (default: 2s)
  • --ease-count-delay (default: 0s)
  • --ease-count-easing (default: ease-out)

Browser support note
CSS @property is supported in Chrome 85+, Edge 85+, Firefox 128+, Safari 16.4+. Add a fallback note for older browsers.

prefers-reduced-motion: Show the final value immediately, skip the animation.

File: animations/counter.css

Metadata

Metadata

Assignees

Labels

GSSoC-26Official GSSoC 2026 issueacceptedContribution approved for integration into EaseMotion CSSanimationAnimation effects, hover interactions, motion ideas, transitionsgood first issueGood for newcomershelp wantedExtra attention neededlevel:intermediateRequires moderate project understanding

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions