Scroll Interaction Design
Codex Runtime Notes
Use Codex-native mechanisms, project conventions, and browser testing. Pair this skill with frontend, Figma, Three.js, native UI, or testing skills only when those skills fill separate responsibilities.
Purpose
Build scroll and motion experiences that feel intentional, performant, accessible, and production-ready. This skill covers web and app interfaces, including scroll-triggered reveals, parallax, smooth scrolling, interactive storytelling, sticky/pinned sections, 3D canvas scenes, and native gesture-linked motion.
Use This Skill When
- The user asks for scroll-triggered animation, parallax, smooth scroll, interactive scrolling, animated scroll storytelling, sticky scenes, or scroll progress effects.
- A web page or app should feel premium, cinematic, playful, spatial, or motion-rich.
- A 3D or WebGL scene needs to respond to scroll.
- A mobile/native app needs scroll-linked gestures, collapsing headers, animated cards, image depth, or carousel motion.
- Existing UI motion feels flat, janky, excessive, inaccessible, or visually generic.
Routing With Other Skills
Use this skill as the motion interaction owner. Combine narrowly:
| Need |
Pair With |
| Build a web app/page |
frontend app or React skill |
| Audit taste and restraint |
design-motion-principles or design-taste-frontend |
| Implement 3D canvas |
Three.js or project frontend skill |
| Implement native/mobile |
building-native-ui, android-development, or platform skill |
| Verify in browser |
browser testing skill |
| Convert Figma to motion UI |
Figma implementation skill plus this skill |
Do not load several broad animation or design skills together unless comparing alternatives is the explicit task.
Decision Tree
Identify the product context.
- SaaS/dashboard: quiet, fast, restrained motion.
- Portfolio/brand/product showcase: expressive scroll scenes and depth are acceptable.
- Game/kids/creative: playful motion can be primary.
- Enterprise/internal tool: motion supports orientation and feedback only.
Choose the scroll mechanism.
- CSS scroll-driven animations for simple progress, reveal, sticky-card, and parallax effects when browser support fits.
- IntersectionObserver plus CSS transitions for robust reveal-on-enter effects.
- Motion for React
useScroll when React state, transforms, and component composition are central.
- GSAP ScrollTrigger for complex pinned timelines, scrubbed choreography, and art-directed sequences.
- Three.js for real 3D camera/object motion, shaders, particles, or spatial scenes.
- React Native Reanimated or platform-native animation APIs for mobile app scroll gestures.
Define the motion map before coding.
- Which section owns scroll height?
- Which elements are pinned or sticky?
- Which values map from progress 0 to 1?
- Which effects are transform-only, opacity-only, or GPU-friendly?
- What is the reduced-motion fallback?
Implement in layers.
- Static layout first.
- Scroll progress and section measurement second.
- Motion mapping third.
- 3D/canvas effects only after layout works.
- Responsive and reduced-motion behavior last.
Verify on real viewports.
- Desktop and mobile.
- Reduced motion enabled.
- Slow CPU or heavy page conditions when possible.
- Keyboard navigation and focus through pinned/smoothed sections.
Motion Quality Rules
- Every animation needs a job: orientation, causality, hierarchy, feedback, storytelling, or delight.
- Avoid motion that fights scroll. User drag should feel in control.
- Prefer
transform, opacity, and carefully used filter or clip-path. Avoid scroll-linked layout changes such as top, left, width, and height unless necessary.
- Use fewer large movements on productivity and operational UIs.
- Use parallax depth subtly: background moves slow, foreground moves faster, text remains readable.
- Pinned sections need enough scroll distance to complete the animation without trapping the user.
- Smooth scrolling must not break native scroll, focus, anchor links, keyboard navigation, or mobile touch expectations.
- 3D scenes must have a nonblank loading/fallback state and should not block page content.
- Never rely on motion as the only way to communicate meaning.
Required Accessibility Rules
- Always support reduced motion.
- On web, use
@media (prefers-reduced-motion: reduce) and disable or simplify large scroll-linked transforms.
- In React/native apps, read the platform reduced-motion signal when available.
- Replace large camera moves, scale jumps, and fast parallax with fades, static states, or shorter transforms.
- Keep content reachable with keyboard and screen readers even inside pinned or smooth-scrolled sections.
Reference Loading
Read these files only when needed:
references/implementation-patterns.md: read before implementing a concrete web, React, GSAP, Three.js, or native scroll-motion feature.
references/validation-checklist.md: read before finalizing or after changing motion code.
references/research-basis.md: read when updating this skill, choosing between APIs, or explaining the technical basis.
Implementation Output Expectations
When building a scroll-motion interface:
- State the chosen mechanism in one sentence when it affects dependencies or architecture.
- Build the actual usable screen first, not a marketing explanation page.
- Include responsive behavior and reduced-motion fallback.
- Test visually in browser when this is a web target and the local app can run.
- Fix jank, overlap, clipped text, blank canvas, or mobile scroll traps before finishing.
Anti-Patterns
- Adding parallax because the page feels empty.
- Combining smooth-scroll libraries, ScrollTrigger, and custom scroll event loops without a clear owner.
- Updating React state on every scroll frame for visual transforms.
- Pinning long sections without enough scroll distance or exit affordance.
- Putting every section in floating cards just to create depth.
- Using 3D canvas as a decorative box when it should be immersive or functional.
- Ignoring mobile touch behavior.
- Shipping without reduced-motion behavior.
- Declaring victory from code review only; scroll motion needs visual/runtime verification.
Changelog
- [2026-05-11] Initial Codex version: added scroll, parallax, smooth scrolling, interactive scrolling, 3D/WebGL, native app motion workflow, references, accessibility rules, and validation expectations.
1---2name: scroll-interaction-design3description: Design and implement high-quality scroll-triggered animation, parallax scrolling, smooth scroll, interactive scrolling, sticky scenes, scrollytelling.4---56# Scroll Interaction Design78## Codex Runtime Notes910Use Codex-native mechanisms, project conventions, and browser testing. Pair this skill with frontend, Figma, Three.js, native UI, or testing skills only when those skills fill separate responsibilities.1112## Purpose1314Build scroll and motion experiences that feel intentional, performant, accessible, and production-ready. This skill covers web and app interfaces, including scroll-triggered reveals, parallax, smooth scrolling, interactive storytelling, sticky/pinned sections, 3D canvas scenes, and native gesture-linked motion.1516## Use This Skill When1718- The user asks for scroll-triggered animation, parallax, smooth scroll, interactive scrolling, animated scroll storytelling, sticky scenes, or scroll progress effects.19- A web page or app should feel premium, cinematic, playful, spatial, or motion-rich.20- A 3D or WebGL scene needs to respond to scroll.21- A mobile/native app needs scroll-linked gestures, collapsing headers, animated cards, image depth, or carousel motion.22- Existing UI motion feels flat, janky, excessive, inaccessible, or visually generic.2324## Routing With Other Skills2526Use this skill as the motion interaction owner. Combine narrowly:2728| Need | Pair With |29| --- | --- |30| Build a web app/page | frontend app or React skill |31| Audit taste and restraint | `design-motion-principles` or `design-taste-frontend` |32| Implement 3D canvas | Three.js or project frontend skill |33| Implement native/mobile | `building-native-ui`, `android-development`, or platform skill |34| Verify in browser | browser testing skill |35| Convert Figma to motion UI | Figma implementation skill plus this skill |3637Do not load several broad animation or design skills together unless comparing alternatives is the explicit task.3839## Decision Tree40411. Identify the product context.42 - SaaS/dashboard: quiet, fast, restrained motion.43 - Portfolio/brand/product showcase: expressive scroll scenes and depth are acceptable.44 - Game/kids/creative: playful motion can be primary.45 - Enterprise/internal tool: motion supports orientation and feedback only.46472. Choose the scroll mechanism.48 - CSS scroll-driven animations for simple progress, reveal, sticky-card, and parallax effects when browser support fits.49 - IntersectionObserver plus CSS transitions for robust reveal-on-enter effects.50 - Motion for React `useScroll` when React state, transforms, and component composition are central.51 - GSAP ScrollTrigger for complex pinned timelines, scrubbed choreography, and art-directed sequences.52 - Three.js for real 3D camera/object motion, shaders, particles, or spatial scenes.53 - React Native Reanimated or platform-native animation APIs for mobile app scroll gestures.54553. Define the motion map before coding.56 - Which section owns scroll height?57 - Which elements are pinned or sticky?58 - Which values map from progress 0 to 1?59 - Which effects are transform-only, opacity-only, or GPU-friendly?60 - What is the reduced-motion fallback?61624. Implement in layers.63 - Static layout first.64 - Scroll progress and section measurement second.65 - Motion mapping third.66 - 3D/canvas effects only after layout works.67 - Responsive and reduced-motion behavior last.68695. Verify on real viewports.70 - Desktop and mobile.71 - Reduced motion enabled.72 - Slow CPU or heavy page conditions when possible.73 - Keyboard navigation and focus through pinned/smoothed sections.7475## Motion Quality Rules7677- Every animation needs a job: orientation, causality, hierarchy, feedback, storytelling, or delight.78- Avoid motion that fights scroll. User drag should feel in control.79- Prefer `transform`, `opacity`, and carefully used `filter` or `clip-path`. Avoid scroll-linked layout changes such as `top`, `left`, `width`, and `height` unless necessary.80- Use fewer large movements on productivity and operational UIs.81- Use parallax depth subtly: background moves slow, foreground moves faster, text remains readable.82- Pinned sections need enough scroll distance to complete the animation without trapping the user.83- Smooth scrolling must not break native scroll, focus, anchor links, keyboard navigation, or mobile touch expectations.84- 3D scenes must have a nonblank loading/fallback state and should not block page content.85- Never rely on motion as the only way to communicate meaning.8687## Required Accessibility Rules8889- Always support reduced motion.90- On web, use `@media (prefers-reduced-motion: reduce)` and disable or simplify large scroll-linked transforms.91- In React/native apps, read the platform reduced-motion signal when available.92- Replace large camera moves, scale jumps, and fast parallax with fades, static states, or shorter transforms.93- Keep content reachable with keyboard and screen readers even inside pinned or smooth-scrolled sections.9495## Reference Loading9697Read these files only when needed:9899- `references/implementation-patterns.md`: read before implementing a concrete web, React, GSAP, Three.js, or native scroll-motion feature.100- `references/validation-checklist.md`: read before finalizing or after changing motion code.101- `references/research-basis.md`: read when updating this skill, choosing between APIs, or explaining the technical basis.102103## Implementation Output Expectations104105When building a scroll-motion interface:1061071. State the chosen mechanism in one sentence when it affects dependencies or architecture.1082. Build the actual usable screen first, not a marketing explanation page.1093. Include responsive behavior and reduced-motion fallback.1104. Test visually in browser when this is a web target and the local app can run.1115. Fix jank, overlap, clipped text, blank canvas, or mobile scroll traps before finishing.112113## Anti-Patterns114115- Adding parallax because the page feels empty.116- Combining smooth-scroll libraries, ScrollTrigger, and custom scroll event loops without a clear owner.117- Updating React state on every scroll frame for visual transforms.118- Pinning long sections without enough scroll distance or exit affordance.119- Putting every section in floating cards just to create depth.120- Using 3D canvas as a decorative box when it should be immersive or functional.121- Ignoring mobile touch behavior.122- Shipping without reduced-motion behavior.123- Declaring victory from code review only; scroll motion needs visual/runtime verification.124125## Changelog126127- [2026-05-11] Initial Codex version: added scroll, parallax, smooth scrolling, interactive scrolling, 3D/WebGL, native app motion workflow, references, accessibility rules, and validation expectations.