What is the Locomotive Scroll skill?
Locomotive Scroll is a skill in the freshtechbro design skills repository. It teaches an AI coding agent to set up the Locomotive Scroll library: the data-scroll markup, smooth scrolling with lerp, parallax speed, sticky elements, viewport callbacks, GSAP ScrollTrigger syncing and the pitfalls that break fixed elements and accessibility.
This skill packages working knowledge of the Locomotive Scroll JavaScript library for an AI coding agent. It describes the required HTML structure, the options to pass at start-up, and the patterns people reach for on immersive landing pages.
The skill is honest about cost. It lists scroll hijacking, low-end device overhead, different touch behaviour on phones and broken fixed positioning as trade-offs, and gives a fix for each.
What the skill sets up
- A scroll container with optional sections, which the skill says improves performance on long pages.
- Parallax through a speed attribute, including slow, fast, negative and horizontal values.
- Sticky elements pinned inside a section or a named target.
- In-view detection with call events that fire on enter and exit.
- Programmatic scrolling with offset, duration, easing and a callback.
Who the Locomotive Scroll skill is for
Best for
- Story-driven landing pages and portfolios with depth and motion.
- Developers who want a smooth scroll that works with GSAP ScrollTrigger.
- Projects that need a mobile fallback and a reduced-motion switch from the start.
Not for
- Plain content pages where native scrolling is better for readers and keyboards.
- Simple fade-in reveals; the same repo points to a lighter scroll-reveal skill for those.
- Pages that rely heavily on position fixed without workarounds.
Use it with UiChemy
The skill produces front-end code for your own project. If the site runs on WordPress, UiChemy Composer writes HTML, CSS and JS inside Elementor or Gutenberg, so check the motion there. Click Get Started on uichemy.com.
How to install Locomotive Scroll Skill: Smooth Scroll and Parallax for Agents
/plugin install extended-3d-scrollThe README also describes uploading skill zips to claude.ai through Settings, Features, Skills.Add the marketplace
Run
/plugin marketplace add freshtechbro/claudedesignskillsonce.Install the bundle
Run
/plugin install extended-3d-scroll. The README lists it as a six-skill bundle that includes Locomotive and Barba.Or copy the skill folder
Clone the repo and copy
.claude/skills/locomotive-scrollinto your project's skills folder.Add the library to your site
The skill itself uses
npm install locomotive-scrollor the jsDelivr CDN links.
Check that it loaded
Ask your agent to add smooth scrolling with a parallax hero. It should use data-scroll-container, data-scroll-speed and a smartphone fallback.
Key features
- Required HTML structureShows the data-scroll-container wrapper, optional data-scroll-section blocks and tracked elements, since every implementation needs these attributes.
- Initialization optionsDocuments el, smooth, lerp for smoothness, multiplier for speed, the in-view class, repeat and offset.
- Data attribute referenceA table of ten attributes, from data-scroll and data-scroll-speed to data-scroll-sticky, data-scroll-target, data-scroll-call and data-scroll-id.
- Parallax recipesSpeed values such as 0.5 for background layers, 3 for foreground layers and negative numbers for reverse motion, plus horizontal direction.
- Viewport eventsScroll and call listeners expose scroll position, speed, direction and per-element progress from 0 to 1.
- GSAP ScrollTrigger syncUses a scroller proxy so ScrollTrigger reads Locomotive's position, and refreshes both libraries together.
- Responsive settingsSeparate tablet and smartphone blocks with breakpoints, so smooth scrolling can be switched off on phones.
- Instance methodsCovers init, update, destroy, start, stop, scrollTo and setScroll, including destroying the instance on route changes to avoid leaks.
- Pitfall fixesSix common problems with solutions: fixed positioning, lazy images, stale positions after DOM changes, accessibility, memory leaks and z-index clashes.
- Reduced-motion switchReads prefers-reduced-motion and turns smooth scrolling off for users who ask for less motion.
Frequently asked questions
What is the Locomotive Scroll skill?
It is a skill in freshtechbro/claudedesignskills that teaches an AI coding agent to use the Locomotive Scroll library. It covers smooth scrolling, parallax speed, viewport detection, sticky elements, horizontal scrolling and GSAP ScrollTrigger integration, plus known pitfalls and their fixes.
How do I install the Locomotive Scroll skill?
In Claude Code, run /plugin marketplace add freshtechbro/claudedesignskills and then /plugin install extended-3d-scroll, which bundles Locomotive Scroll with five other skills. Alternatively clone the repo and copy .claude/skills/locomotive-scroll into your project.
Does Locomotive Scroll hurt accessibility?
The skill names scroll hijacking as an accessibility risk and tells the agent to offer a disable option. Its example reads prefers-reduced-motion and sets smooth to false when the user asks for reduced motion. Keyboard and screen reader behaviour still needs testing.
How do I use Locomotive Scroll with GSAP ScrollTrigger?
Register ScrollTrigger, create the Locomotive instance, call ScrollTrigger.update on its scroll event and define a scrollerProxy for the container. Then point each trigger's scroller at that container and refresh both libraries together. The GSAP ScrollTrigger skill covers the other half.
Should I disable smooth scrolling on mobile?
The skill suggests it when performance is poor. Its responsive example sets smartphone smooth to false below a 768 pixel breakpoint and keeps tablet smoothing at 1024. It also says touch scrolling feels different and should be tested extensively.
Why does position fixed break with Locomotive Scroll?
Smooth scroll moves content with transforms, which breaks fixed positioning inside the container. The skill's fix is to use data-scroll-sticky or place fixed elements such as a nav outside the scroll container. Check animation performance for related costs.
What are Locomotive Scroll skill alternatives?
For simple fade and slide reveals the same repo has a scroll-reveal skill built on AOS. For timeline control, GSAP ScrollTrigger needs no smooth-scroll layer. Accessible Motion helps review the result for reduced motion.
Does the skill work in Cursor or Codex?
The repo presents itself as a Claude Code plugin marketplace and says skills can also be uploaded to claude.ai. It does not state support for Cursor or Codex, so treat those as untested. The library code itself is plain JavaScript.


