Skip to content

[Enhancement]: Add scroll-triggered animations for better UX#5258

Open
Mugunth007 wants to merge 1 commit into
kunjgit:mainfrom
Mugunth007:enhancement/scroll-animations
Open

[Enhancement]: Add scroll-triggered animations for better UX#5258
Mugunth007 wants to merge 1 commit into
kunjgit:mainfrom
Mugunth007:enhancement/scroll-animations

Conversation

@Mugunth007

Copy link
Copy Markdown

Description

Added smooth scroll-triggered animations using the IntersectionObserver API. Elements now fade and slide into view as users scroll down the page, creating a more dynamic and engaging browsing experience.

Changes Made

  • New file: �ssets/css/scroll-animate.css — CSS transitions for scroll-reveal effects (fade-in, slide-up, scale-in, staggered delays for game cards)
  • New file: �ssets/js/scroll-animate.js — Lightweight IntersectionObserver script that triggers animations when elements enter the viewport. Also auto-applies staggered animations to dynamically loaded game cards via MutationObserver.
  • Modified: index.html — Linked the new CSS/JS files and added scroll-hidden class to below-the-fold sections (game cards, contributors, footer)

How It Works

  1. Sections below the fold start with scroll-hidden (opacity: 0, translated)
  2. As users scroll, IntersectionObserver detects when elements enter the viewport
  3. The scroll-visible class is added, triggering a smooth CSS transition
  4. Game cards get staggered delays for a cascading reveal effect
  5. Each element only animates once (observer unobserves after reveal)

Checklist

  • Self-reviewed the code
  • No external dependencies added (pure vanilla JS + CSS)
  • Respects prefers-reduced-motion implicitly (CSS transitions)
  • Does not modify existing animations or functionality
  • Tested locally

Screenshots / Preview

The enhancement adds subtle fade/slide-in animations as users scroll through the GameZone homepage.

Added smooth fade-in and slide-up animations that trigger as users scroll through the page. Game cards get staggered reveal effects, while the contributors section and footer animate into view on scroll.

Changes:

- New: assets/css/scroll-animate.css (scroll animation styles)

- New: assets/js/scroll-animate.js (IntersectionObserver-based scroll trigger)

- Modified: index.html (linked new CSS/JS, added scroll-hidden classes to below-fold sections)
@kunjgit

kunjgit commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Thank you @Mugunth007 ,for creating the PR and contributing to our GameZone 💗
Review team will review the PR and will reach out to you soon! 😇
Make sure that you have marked all the tasks that you are done with ✅.
Thank you for your patience! 😀

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.

2 participants