Skip to content

feat: add animated count-up effects to hero statistics#225

Open
AbhishekMauryaGEEK wants to merge 1 commit into
Coder-s-OG-s:mainfrom
AbhishekMauryaGEEK:feat/animated-hero-stats
Open

feat: add animated count-up effects to hero statistics#225
AbhishekMauryaGEEK wants to merge 1 commit into
Coder-s-OG-s:mainfrom
AbhishekMauryaGEEK:feat/animated-hero-stats

Conversation

@AbhishekMauryaGEEK
Copy link
Copy Markdown

Summary

Added smooth animated count-up effects to the landing page hero statistics section to improve visual engagement and perceived interactivity.

Changes Made

  • added viewport-triggered animated counters for hero statistics
  • counters now animate smoothly when the section enters the viewport
  • implemented randomized lower starting values for more natural motion
  • added easing/deceleration for a more polished premium feel
  • animation runs only once per page load
  • added reduced-motion accessibility support
  • optimized animation updates to avoid unnecessary React rerenders
  • preserved all existing styling/layout

Animation Behavior

  • counters animate only when visible on screen

  • animation duration capped around 2 seconds

  • values smoothly transition to exact final numbers

  • supports:

    • percentages
    • negative values
    • k formatted values
    • comma-separated large numbers

Technical Notes

  • uses Framer Motion animation utilities
  • uses viewport detection via useInView
  • includes reduced motion preference handling
  • reusable stat counter implementation

Demo

Recording.2026-05-26.003518.mp4

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 25, 2026

@AbhishekMauryaGEEK is attempting to deploy a commit to the codersogs-3057's projects Team on Vercel.

A member of the Team first needs to authorize it.

@AbhishekMauryaGEEK AbhishekMauryaGEEK changed the title Title: feat: add animated count-up effects to hero statistics feat: add animated count-up effects to hero statistics May 25, 2026
@AbhishekMauryaGEEK
Copy link
Copy Markdown
Author

Could the appropriate contribution labels (SSOC/GSSOC/NSoC/frontend/ui-ux etc.) be added to this PR if applicable? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant