Back to blocks

What is this?
As you scroll, the screen stays put. Before wipes sideways into After, then a third photo grows in and fills the view. Swap labels, photos, and notes, then drop it into a beauty or product landing page.
Full TSX source. No account needed.
home-point-ba.tsx
"use client"; import { useEffect, useRef, useState } from "react";import gsap from "gsap";import { ScrollTrigger } from "gsap/ScrollTrigger";import { getScrollParent, isElementScrollRoot } from "@/lib/studioPreviewMotion";import { clamp01, cn } from "@/lib/utils"; Read the guide
- Read the guide: GSAP pin-spacer Explained: Why It Adds Space and How to Fix Pinning in React and Next.js
- Read the guide: Aceternity UI Alternatives in 2026: Animated React Libraries Compared (Free vs Paid)
- Read the guide: Before After Slider in React and Next.js
- Read the guide: GSAP ScrollTrigger in Next.js: useGSAP, Scrub, Pin, and Cleanup
BlockPass
Before After Scroll
As you scroll, the screen stays put. Before wipes sideways into After, then a third photo grows in and fills the view. Swap labels, photos, and notes, then drop it into a beauty or product landing page.
Checking access…
Live PreviewVerified Technical Spec
- Animation
- GSAP
- Reduced motion
- Verified
- Keyboard focus
- Not detected in source
- Compatibility
- Tailwind CSS v3.4 + v4 · React 19 / Next.js 15 App Router + Vite / Remix compatible
Included
- Copy source into Cursor or Claude for agent install
- Responsive on phone, tablet, and desktop
- Finished React · TypeScript · Tailwind CSS · GSAP UI
Dependencies
- React 19.0.0
- Typescript 5.7.2
- Tailwindcss 3.4.16
- GSAP 3.15.0
Tech Stack
- React
- TypeScript
- Tailwind CSS
- GSAP
Version 1.0.0





