Saman
  • Projects
  • Gallery
  • Blog
  • Resume
GitHub

Build experiments. Learn constantly. Ship iteratively.

Next.jsTypeScriptGSAPThree.jsLenisTailwind
  • GitHub
  • LinkedIn
  • Instagram
  • Saman Sahraei
  • Projects
  • Resume
  • Blog
  • Gallery

© 2026 Saman Sahraei

←All notes
Published April 2, 20255 min readSaman Sahraei

Scroll-Driven UI Without Jank

Lenis, GSAP ScrollTrigger, and the discipline of animating only transform and opacity.

GSAPAnimationPerformance
Scroll-Driven UI Without Jank by Saman Sahraei

Scroll animations go wrong when they fight the browser. Layout thrashing, scroll jank, and main-thread clustering all come from the same mistake: animating properties that trigger reflow.

Lenis owns scroll; GSAP owns time

Lenis smooths wheel input into native scroll. GSAP reads that scroll via ScrollTrigger and drives transforms. The two systems stay in sync through a single ticker instead of competing proxies.

  • ◆Animate transform and opacity only
  • ◆matchMedia for reduced-motion fallbacks
  • ◆Section ids that match navigation and progress rails
  • ◆Kill timelines on unmount to prevent memory leaks
Motion should explain structure, not decorate it.

More notes

December 8, 2025

Real-Time Frontend Architecture

How to separate event throughput from render throughput using normalization, buffering, batch processing, and selective subscriptions in high-frequency dashboards.

November 12, 2025

Tile-Based Caching for Interactive Maps

How square tile keys, spatial caches, and zoom-aware fetching keep dense vendor maps responsive without blocking the UI thread.

October 3, 2025

React Query Patterns for Live Portfolio Demos

Stale times, refetch intervals, and optimistic UI for dashboards that look alive without pretending to be production infrastructure.