Magnetic Dot Grid
A canvas field of dots that lean toward the pointer on spring physics, swell and tint near it, then settle with a soft wobble; clicks send a ripple. Theme-aware, static on reduced motion.
Try it: Move across the field; click for a ripple.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/magnetic-dot-grid.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/magnetic-dot-grid. You can also copy the source into components/ui/magnetic-dot-grid.tsx (view on GitHub).
Usage
import { MagneticDotGrid } from '@/components/ui/magnetic-dot-grid'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
gap / radius / strength | number | 22 / 140 / 0.35 | Dot spacing, influence radius, pull (negative repels). |
height | number | 420 | Height in px. |
children | ReactNode | headline | Overlay content. |
Dependencies
motionlucide-react
Related Motion Showcase components
- Page Curtain Transition
Route changes play a staggered column curtain: panels sweep up to cover, the next page name flashes on the curtain, then they lift away to reveal it. Reduced motion cross-fades.
- Spring Stagger Grid
A filterable tile grid that enters on a diagonal ripple (delay = row + column), re-flows on layout springs when filtered and exits with a quick scale-down.
- Lit Product Card 3D
A product card with real lighting: tilt follows the pointer, a specular highlight tracks the light while the cast shadow moves opposite, the product floats on its own Z layer and swatches recolour…
- Parallax Depth Stack
A fanned card stack on CSS 3D layers: the pointer tilts it and each layer parallaxes by depth with a moving sheen; click or Enter sends the front card to the back on a spring.
- Timeline Scrubber
A media scrubber with a waveform that lights up behind the playhead, a thumb that grows while dragging, chapter markers that snap within 1.5 s, a time bubble and full slider keyboard support.
- Kinetic Stats Band
A band of big tabular numbers that count up on an expo curve when scrolled into view, with motion blur on the fast part and sparklines that draw themselves.