aframe-webxr
Declarative web framework for building browser-based 3D, VR, and AR experiences using HTML and entity-component architecture. Use this skill when creating…
Comprehensive skill for Locomotive Scroll smooth scrolling library with parallax effects, viewport detection, and scroll-driven animations. Use this skill when implementing smooth scrolling experiences, creating parallax effects, building scroll-triggered animations, or
$ npx -y skills add freshtechbro/claudedesignskills --skill locomotive-scroll --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/locomotive-scrollContext preview
The summary Claude sees to decide when to auto-load this skill.
Comprehensive skill for Locomotive Scroll smooth scrolling library with parallax effects, viewport detection, and scroll-driven animations. Use this skill when implementing smooth scrolling experiences, creating parallax effects, building scroll-triggered animations, or
name: locomotive-scroll description: Comprehensive skill for Locomotive Scroll smooth scrolling library with parallax effects, viewport detection, and scroll-driven animations. Use this skill when implementing smooth scrolling experiences, creating parallax effects, building scroll-triggered animations, or developing immersive scrolling websites. Triggers on tasks involving Locomotive Scroll, smooth scrolling, parallax, scroll detection, scroll events, sticky elements, horizontal scrolling, or GSAP ScrollTrigger integration. Integrates with GSAP for advanced scroll-driven animations.
Comprehensive guide for implementing smooth scrolling, parallax effects, and scroll-driven animations using Locomotive Scroll.
Locomotive Scroll is a JavaScript library that provides:
**When to use Locomotive Scroll:**
**Trade-offs:**
npm install locomotive-scroll
// ES6 import LocomotiveScroll from 'locomotive-scroll'; import 'locomotive-scroll/dist/locomotive-scroll.css'; // Or via CDN <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/locomotive-scroll/dist/locomotive-scroll.min.css"> <script src="https://cdn.jsdelivr.net/npm/locomotive-scroll/dist/locomotive-scroll.min.js"></script>
Every Locomotive Scroll implementation requires specific data attributes:
<!-- Scroll container (required) -->
<div data-scroll-container>
<!-- Scroll sections (optional, improves performance) -->
<div data-scroll-section>
<!-- Tracked elements -->
<h1 data-scroll>Basic detection</h1>
<!-- Parallax element -->
<div data-scroll data-scroll-speed="2">
Moves faster than scroll
</div>
<!-- Sticky element -->
<div data-scroll data-scroll-sticky>
Sticks within section
</div>
<!-- Element with ID for tracking -->
<div data-scroll data-scroll-id="hero">
Accessible via JavaScript
</div>
<!-- Call event trigger -->
<div data-scroll data-scroll-call="fadeIn">
Triggers custom event
</div>
</div>
</div>const scroll = new LocomotiveScroll({
el: document.querySelector('[data-scroll-container]'),
smooth: true,
lerp: 0.1, // Smoothness (0-1, lower = smoother)
multiplier: 1, // Speed multiplier
class: 'is-inview', // Class added to visible elements
repeat: false, // Repeat in-view detection
offset: [0, 0] // Global trigger offset [bottom, top]
});| Attribute | Purpose | Example | |-----------|---------|---------| | `data-scroll` | Enable detection | `data-scroll` | | `data-scroll-speed` | Parallax speed | `data-scroll-speed="2"` | | `data-scroll-direction` | Parallax axis | `data-scroll-direction="horizontal"` | | `data-scroll-sticky` | Sticky positioning | `data-scroll-sticky` | | `data-scroll-target` | Sticky boundary | `data-scroll-target="#section"` | | `data-scroll-offset` | Trigger offset | `data-scroll-offset="20%"` | | `data-scroll-repeat` | Repeat detection | `data-scroll-repeat` | | `data-scroll-call` | Event trigger | `data-scroll-call="myFunction"` | | `data-scroll-id` | Unique identifier | `data-scroll-id="hero"` | | `data-scroll-class` | Custom class | `data-scroll-class="is-visible"` |
import LocomotiveScroll from 'locomotive-scroll';
const scroll = new LocomotiveScroll({
el: document.querySelector('[data-scroll-container]'),
smooth: true
});<div data-scroll-container>
<div data-scroll-section>
<h1>Smooth scrolling enabled</h1>
</div>
</div><!-- Slow parallax --> <div data-scroll data-scroll-speed="0.5"> Moves slower than scroll (background effect) </div> <!-- Fast parallax --> <div data-scroll data-scroll-speed="3"> Moves faster than scroll (foreground effect) </div> <!-- Reverse parallax --> <div data-scroll data-scroll-speed="-2"> Moves in opposite direction </div> <!-- Horizontal parallax --> <div data-scroll data-scroll-speed="2" data-scroll-direction="horizontal"> Moves horizontally </div>
// Track scroll progress
scroll.on('scroll', (args) => {
console.log(args.scroll.y); // Current scroll position
console.log(args.speed); // Scroll speed
console.log(args.direction); // Scroll direction
// Access specific element progress
if (args.currentElements['hero']) {
const progress = args.currentElements['hero'].progress;
console.log(`Hero progress: ${progress}`); // 0 to 1
}
});
// Call events
scroll.on('call', (value, way, obj) => {
console.log(`Event triggered: ${value}`);
// value = data-scroll-call attribute value
// way = 'enter' or 'exit'
// obj = {id, el}
});<div data-scroll data-scroll-id="hero">Hero section</div> <div data-scroll data-scroll-call="playVideo">Video section</div>
<!-- Stick within parent section --> <div data-scroll-s
Professional design agency skillstack for 3D/WebGL, animation, and modern web development Claude Code plugin marketplace providing comprehensive coverage of modern web technologies including Three.js, GSAP, React Three Fiber, Framer Motion, Babylon.js, and
Repo: freshtechbro/claudedesignskills
Declarative web framework for building browser-based 3D, VR, and AR experiences using HTML and entity-component architecture. Use this skill when creating…
Pre-built animated React component collections combining Magic UI (150+ TypeScript/Tailwind/Motion components) and React Bits (90+ minimal-dependency animated…
Versatile JavaScript animation engine for DOM, CSS, SVG, and JavaScript objects. Use when creating timeline-based animations, stagger effects, SVG morphing,…
Comprehensive skill for Babylon.js 3D web rendering engine. Use this skill when building real-time 3D experiences, browser-based games, interactive…
Page transitions library for creating fluid, smooth transitions between website pages. Use this skill when implementing page transitions, creating SPA-like…
Blender to web export workflows for 3D models and animations. Use this skill when exporting Blender models to glTF for web, optimizing 3D assets for Three.js…