THE PLAYGROUND · SCROLL & NAVIGATION
Scroll-triggered Reveal
Content appears as it enters the visible area.
Scroll-triggered RevealScroll & Navigation · Content appears as it enters the visible area.
SCROLLFIELD NOTES
Find your rhythmA moment worth noticing.
Make space for ideasA moment worth noticing.
Follow the feelingA moment worth noticing.
Stay curiousA moment worth noticing.
Keep exploringA moment worth noticing.
1import { useState } from "react";2import { motion } from "motion/react";3 4const surface = { width: 100, height: 100, borderRadius: 16, background: "#b8ed79", display: "grid", placeItems: "center", color: "#141714" };5 6export default function ScrollRevealDemo() {7 const [scroll, setScroll] = useState(0);8 return <div onScroll={e => setScroll(e.currentTarget.scrollTop)} style={{height: 260, overflowY: "auto"}}>9 <header style={{position: "sticky", top: 0, background: "#202420", height: 40, color: "white"}}>Field notes</header>10 11 {[0,1,2,3,4,5,6].map(n => <motion.div key={n} style={{...surface, width: 260, height: 80, margin: 12}} initial={{opacity:0,y:20}} animate={{opacity:scroll > n*70-180 ? 1 : 0, y:scroll > n*70-180 ? 0 : 20}} transition={{ duration: 0.6, delay: 0, ease: "easeInOut" }}>Note {n+1}</motion.div>)}12 </div>;13}Install: npm install motion. Observe visibility inside the scrolling container. This compact example illustrates the core technique; the styled playground contains additional presentation details.