/loxihart-design:building-parallax-scroll-effectsfrom loxihart-design
Builds scroll-linked motion effects — depth-layer parallax, sticky pinning, scroll-triggered reveals, horizontal scroll-jacking, pointer/mouse parallax, scale-on-scroll, velocity-aware marquees, and native CSS scroll-driven animation (animation-timeline) — with performance and accessibility handled from the first line of code, not bolted on after. Use when the user asks for parallax scrolling, scroll animations, scroll-triggered effects, depth on scroll, sticky sections, pinned sections, horizontal scroll sections, scroll-jacking, mouse or pointer parallax, animate on scroll, reveal on scroll, scroll-linked motion, or a landing page/hero that should "feel alive" while scrolling. Covers four implementation stacks — vanilla CSS/JS, native CSS scroll-timelines, GSAP ScrollTrigger, and Motion (the library formerly named Framer Motion) for React — and picks between them by tradeoff, not by default. Check this before writing any scroll-linked animation, even a single fade-in-on-scroll.
Trending skills
7-day visitors to each skill page
Ships in loxihart-design. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A source-of-truth for scroll-linked motion: which effect communicates what, which stack to build it in, and the performance/accessibility floor every effect has to clear before it ships. The effect taxonomy below started from a survey of what a no-code visual-effects gallery shows off; everything past the taxonomy — the code, the performance rules, the accessibility contract, the stack tradeoffs — is original engineering work, because that gallery is marketing inspiration for a visual builder, not an implementation guide. It has zero lines of code and no browser-support, performance, or reduced-motion guidance anywhere in it.
What's the goal?
├─ Set a scene / add depth to a hero ──────── Depth-layer parallax (below)
├─ Spotlight one element while content moves ─ Sticky pin + pass-through
├─ Make a headline/image arrive with weight ── Scroll-triggered reveal
├─ Emphasize a focal product/shape ─────────── Scale/zoom on scroll
├─ Turn vertical scroll into a gallery rail ── Horizontal scroll-linked panel
├─ Add responsiveness to cursor movement ───── Pointer/mouse parallax
├─ Animate a ticker/logo rail ───────────────── Velocity-aware marquee
└─ Not sure ─────────────────────────────────── references/technique-catalog.md
Which stack?
├─ Portable, no bundler, static/single-file ── Vanilla CSS + JS (A)
├─ Effect is a pure keyframe animation ──────── Native CSS scroll-timeline (B), + JS fallback
├─ Needs precise scrubbing/pinning at scale ──── GSAP + ScrollTrigger (C)
├─ Already inside a React app ──────────────── Motion for React (D)
└─ Unsure ───────────────────────────────────── Stack Selection Matrix below
These apply regardless of technique or stack. Skipping any of these is how parallax becomes the reason a site feels sluggish or excludes someone.
Compositor-only properties. Animate transform and opacity only.
Never animate top, left, width, height, or margin on scroll —
each one forces a layout recalculation on every frame, which is the
textbook cause of scroll jank.
Reduced motion means off, not smaller. prefers-reduced-motion: reduce
disables the scroll-linked movement entirely — it does not mean "move it
20% less." Content must render in its final, readable state with no
transform applied.
@media (prefers-reduced-motion: reduce) {
[data-parallax], [data-reveal], [data-pin] {
transform: none !important;
animation: none !important;
transition: none !important;
}
}
Throttle everything, prefer observers over polling. Any scroll or
pointermove listener that touches the DOM must be wrapped in
requestAnimationFrame and attached with { passive: true }. For simple
enter/exit detection (reveals, pins turning on), use IntersectionObserver
instead of a scroll listener — it doesn't run on every scroll tick at all.
Reserve scroll-position math for effects that genuinely need continuous
position (true depth offset, horizontal-scroll translate amount).
Coarse pointers don't get pointer-parallax. Gate any cursor-driven
effect behind matchMedia('(pointer: fine)'). On touch devices it does
nothing useful and just spends battery. Reduce layer count and movement
range on narrow viewports generally — a 3-layer parallax hero that's
subtle on desktop is often nauseating at arm's length on a phone.
Native CSS scroll-timelines need a fallback, always. As of mid-2026,
animation-timeline has full support in Chrome, Edge, Opera, and Safari 26+,
but is still shipped behind a flag in Firefox — roughly 85% global support
on caniuse [SOURCED: Josh Comeau, joshwcomeau.com, June 2026]. Feature-detect
with @supports and ship a real fallback, not a broken effect for ~15% of
visits:
@supports (animation-timeline: view()) {
.reveal { animation: reveal-in linear; animation-timeline: view(); animation-range: entry 0% cover 40%; }
}
@supports not (animation-timeline: view()) {
/* IntersectionObserver adds .is-visible; this rule renders that state */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.is-visible { opacity: 1; transform: none; }
}
Never trap scroll. A pinned or horizontal-scroll-jacked section must resolve within roughly one to two viewport heights of normal scrolling and then release control back to the page. Don't require a specific gesture, a minimum dwell time, or a "correct" scroll speed to escape it.
Effect-off parity. Every scroll-jacked or pinned section must remain fully readable and keyboard-navigable with the animation mentally switched off — correct tab order, no content that only appears on hover or only via a pointer-parallax interaction. The motion is a progressive enhancement on top of accessible markup, never a replacement for it.
Full detail, checklists, and mobile-testing steps:
references/performance-and-accessibility.md
| Technique | Effect | Best for | Complexity |
|---|---|---|---|
| Depth-layer parallax | BG/mid/FG move at different scroll speeds | Hero scenes, environmental storytelling | Low |
| Sticky pin + pass-through | Element pins while related content scrolls past it | Product spotlights, captions, quotes | Low–Med |
| Scroll-triggered reveal | Text/image arrives via mask, clip, or fade as it enters view | Headlines, narrative beats | Low |
| Scale/zoom on scroll | Element grows or shrinks as it centers in the viewport | Focal product shots, "step closer" moments | Low |
| Horizontal scroll-linked panel | Vertical scroll drives horizontal translation | Galleries, timelines, case-study rails | Med–High |
| Pointer/mouse parallax | Elements shift with cursor position | Hero interactivity on desktop | Low |
| Velocity-aware marquee | Ticker speeds/slows/reverses with scroll speed and direction | Logo rails, footers | Med |
| 3D perspective layering | True translateZ depth under a perspective container | Cinematic hero moments | Med |
| Scroll-scrubbed media | Scroll position maps to video currentTime or canvas frame | Product demos, explainer sequences | High |
| Scroll-linked theme shift | A background or theme value changes across page zones | Section-to-section mood changes | Low |
Full write-up per technique — what it looks like, when it earns its
complexity, and the mistake people actually make with it —
references/technique-catalog.md.
| A. Vanilla CSS+JS | B. Native CSS scroll-timeline | C. GSAP + ScrollTrigger | D. Motion for React | |
|---|---|---|---|---|
| Dependencies | None | None (CSS only) | 1 (free, see below) | 1 (React-only) |
| Ceiling on performance | Good, if you follow the non-negotiables | Best — compositor-only by construction | Good — battle-tested measurement/resize handling | Good |
| Handles horizontal scroll-jack cleanly | You hand-roll the math | Not really — this needs JS-level measurement | Yes, this is its strongest case | Yes, via useScroll/useTransform |
| Works outside React | Yes | Yes | Yes | No |
| Current caveat | You own every edge case | ~85% support; Firefox behind a flag [SOURCED] | None — was a paid Club plugin, now fully free since April 2025 after Webflow's GreenSock acquisition [SOURCED] | Import path is now motion/react; old framer-motion package still installs but isn't actively developed [SOURCED] |
Default: A for portable, single-file, or no-bundler builds — this is
what the four examples in examples/ use. D for anything already inside a
React/Vite codebase, since it's idiomatic there and ships a
useReducedMotion hook for free. C only when a section genuinely needs
scrubbing or pinning math across many breakpoints that A or D would take
real effort to get right by hand. B is a performance upgrade layered on
top of A or D, not a standalone choice yet — the Firefox gap means you're
maintaining a fallback path either way.
Full code recipes for all four stacks: references/implementation-recipes.md
references/performance-and-accessibility.md):
reduced-motion truly disables movement; the coarse-pointer/mobile path
was a deliberate choice, not an accident; tab order and content access
work with the effect switched off; no scroll-timeline effect ships
without a @supports not (...) fallback.| Need | Open |
|---|---|
| Full technique write-ups, common mistakes | references/technique-catalog.md |
| Real code for all 4 stacks, per technique | references/implementation-recipes.md |
| Performance/accessibility checklists, mobile testing | references/performance-and-accessibility.md |
| Deeper stack tradeoffs, edge cases | references/decision-framework.md |
| Four complete, differently-branded worked examples | examples/ (see examples/README.md) |
Should trigger:
Should NOT trigger:
Observed: all five positive prompts contain vocabulary directly in the description (parallax, scroll-triggered, background moves slower than foreground, feel alive when you scroll, horizontal scroll driven by scroll) → PASS. Negative 1 has no scroll-position vocabulary — it's a timeline animation, not a scroll-timeline one → correctly silent. Negative 2 is functional scrolling with no visual-motion request → correctly silent.
building-parallax-scroll-effects) and matches the directory — donereferences/ present (this file exceeds 100 lines) — donereferences/*.md, examples/) exists at
that exact path in the packaged zip — verified at packaging timeanimation-timeline (native CSS scroll-driven animation) has full support in Chrome, Edge, Opera, and Safari 26+, and ships behind a flag in Firefox as of mid-2026 — roughly 85% global support on caniuse (Josh Comeau, joshwcomeau.com, June 19 2026).motion with import path motion/react. The legacy framer-motion package still installs but is no longer actively developed.examples/README.md (opens in a new tab)examples/ferrous-and-fold.html (opens in a new tab)examples/loopline.html (opens in a new tab)examples/ridgeline-supply.html (opens in a new tab)examples/the-marginalia.html (opens in a new tab)references/decision-framework.md (opens in a new tab)references/implementation-recipes.md (opens in a new tab)references/performance-and-accessibility.md (opens in a new tab)references/technique-catalog.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub krosebrook/loxihart-skills --plugin loxihart-design19 skills in this plugin
/advanced-ux-patternsComprehensive UX best practices including accessibility (WCAG 2.2), interaction patterns, user research methods, and usability principles. Use when designing user interfaces, conducting UX audits, or implementing accessible, user-centered designs. Also triggers on WCAG, ARIA, keyboard navigation, screen reader, focus trap, focus management, touch targets, usability testing, heuristic evaluation, card sorting, tree testing, NPS, SUS, form design, navigation patterns, mobile UX, design handoff, cognitive load, information architecture, dark patterns, skeleton screen, error states, reduced motion, dark mode accessibility, component states, error recovery, or any request to audit, improve, spec, or review a user interface — even casually. If UI is involved, use this skill./advanced-visual-designAdvanced visual design techniques including typography systems, color theory, grid-based layouts, visual hierarchy, and composition principles. Use when creating high-quality visual designs, establishing design foundations, or implementing sophisticated design systems. Also triggers on type scale, font pairing, color palette, HSL color, 8-point grid, 12-column layout, visual hierarchy, whitespace, composition, rule of thirds, golden ratio, dark mode design, optical adjustments, or easing curves. Even if someone says "make this look professional" or "set up my design foundations" — use this skill./applying-web-design-standardsApplies web design standards covering typography systems, color theory, grid layouts, design tokens, component library architecture, responsive CSS, and performance optimization. Use when the user mentions: type scale, font pairing, color palette, HSL color, 8-point grid, design tokens, component API, Storybook, Style Dictionary, atomic design, responsive layout, mobile-first, Core Web Vitals, CSS Grid, Flexbox, container queries, pre-launch audit. Does NOT activate for Kyle-specific branded builds — use executing-branded-frontends or managing-design-briefs instead./auditing-cross-app-experiencesAudit, shape, redesign, animate, harden, test, and ship an existing application or frontend with evidence-bound UX, accessibility, performance, security, and release checks. Invoke for all requests to improve a site's design, usability, motion, responsiveness, mobile experience, onboarding, dashboard, 3D game view, or production readiness. Preserve existing product intent and release holds./building-flashfusion-live-artifactsBuilds, patches, and registers the FlashFusion Agent Control Center as a Cowork live artifact — void-dark dashboard with semi-transparent blur panels, live Supabase data, and per-panel Demo fallback. Use when the user mentions: build the FlashFusion artifact, rebuild the control center, add a panel to the dashboard, the artifact is broken, update FlashFusion dashboard, patch the agent dashboard, fix the live connection, update brand tokens, ff artifact, ff dashboard, agent control panel, agent control center, demo mode artifact, approval queue panel, HITL queue dashboard, live agent view, ChaosClubCo dashboard. Fires on dashboard or control-center requests in the FlashFusion context even when FlashFusion or artifact is not named. PERSONAL lane only — never run on LOXIHART tasks.
/compiling-brand-design-systemsUse whenever the user says "compile the design system", "build a design system", "build the brand system", "make me a token system", "turn this brand into tokens", "design tokens for", "component library for my brand", or names a brand plus "design system" — even if they don't say "tokens" or "components". Also triggers on: brand system compile, full DS build, token architecture, dark/light theming build, sub-brand namespace, CVA component set, DTCG tokens, ship the design system, rebuild the design system, extend the design system for [sub-brand].
Other plugins' skills for the same job