Create Lenis Scroll Pattern
lenis_create_scroll_patternGenerates ready-to-use code for Lenis smooth scroll patterns including parallax, infinite scroll, snap, horizontal, WebGL sync, and scroll-triggered animations, with optional GSAP integration.
Instructions
Generates production-ready code for common Lenis scroll patterns.
Available patterns: parallax, infinite-scroll, snap, horizontal scroll, WebGL sync, and scroll-triggered animations.
Args:
pattern ('parallax' | 'infinite-scroll' | 'snap' | 'horizontal' | 'webgl-sync' | 'scroll-triggered'): Pattern to generate
framework ('vanilla' | 'react' | 'vue' | 'nextjs'): Target framework (default: 'vanilla')
with_gsap (boolean): Include GSAP for animations (default: true)
Returns: Complete code with HTML structure, CSS, JavaScript setup, and explanatory comments.
Examples:
"Parallax effect with GSAP" → pattern: 'parallax', with_gsap: true
"Horizontal scroll section" → pattern: 'horizontal'
"Snap scrolling between sections" → pattern: 'snap'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | Scroll pattern to generate: parallax, infinite-scroll, snap, horizontal, webgl-sync, or scroll-triggered | |
| framework | No | Target framework | vanilla |
| with_gsap | No | Include GSAP for animations (recommended for most patterns) |