Interactive 4×7 tilted image grid that reacts to mouse movement with GSAP animations. Perfect for dynamic CMS image galleries.
- 4×7 grid layout with 28 image slots
- Mouse-reactive movement - rows shift based on cursor position
- Collection List integration - automatically extracts images from CMS
- Tilted perspective with customizable rotation angle
- Smooth GSAP animations with configurable duration
- Auto-repeat images if fewer than 28 provided
| Prop | Type | Default | Description |
|---|---|---|---|
children |
slot | - | Collection List with images |
imageUrlsJson |
string | '[]' | JSON array of image URLs (optional) |
gradientColor |
string | 'black' | Radial gradient background color |
rotationAngle |
number | -15 | Grid tilt angle in degrees (-45 to 45) |
maxMoveAmount |
number | 300 | Maximum movement intensity (0-1000px) |
animationDuration |
number | 0.8 | Animation speed in seconds (0.1-3) |
itemBackgroundColor |
string | '#111' | Card background color |
borderRadius |
string | '10px' | Card corner rounding |
- Drag component onto canvas
- Add Collection List inside the "Images" slot
- Connect to Collection (e.g., Gallery)
- Add Image element inside Collection List Item
- Bind Image to Collection image field
- Done! Images appear in the animated grid
Use the "Image URLs (JSON)" field:
["url1.jpg", "url2.jpg", "url3.jpg"]import GridMotion from './components/GridMotion';
<GridMotion
rotationAngle={-15}
maxMoveAmount={300}
animationDuration={0.8}
itemBackgroundColor="#111"
borderRadius="10px"
>
{/* Collection List */}
</GridMotion>Hybrid (Props + CSS Variables) - Primary controls via props with CSS variable overrides available:
- Props provide defaults for quick setup
- CSS variables can override for advanced theming
- Component-specific styling for unique appearance
- Uses GSAP for smooth animations
- Shadow DOM slot extraction for Collection List images
- Window-level mouse events for Webflow compatibility
- Mouse enter/leave tracking for performance
- Images repeat automatically if fewer than 28
- SSR disabled (requires browser APIs)
- GSAP lag smoothing disabled for smooth animations in Webflow