Snap Magnet Scroll
Cinematic full-bleed sections with magnetic overshoot settle and glowing rail.
Try it: Scroll, swipe, or ↑↓ — magnets overshoot then settle.
Brings its own background. A cinematic dark reel that keeps its backdrop on any page. Restyle the scrolling surface with viewportClassName (e.g. a lighter bg-* and border), and the outer box with className.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/snap-magnet-scroll.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/snap-magnet-scroll. You can also copy the source into components/ui/snap-magnet-scroll.tsx (view on GitHub).
Usage
import { SnapMagnetScroll } from '@/components/ui/snap-magnet-scroll'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
viewportClassName | string | — | Classes merged onto the scrolling viewport (surface, border, radius, height). |
Related Vertical Scroll components
- Velocity Fade Stack
Rich cards scale/blur/opacity from distance + inertia velocity; center focus.
- Parallax Reel Scroll
Multi-layer stars/grid + mid art + foreground cards with scrub progress.
- Velocity Marquee
Oversized editorial rails that idle along, then answer your scroll: scroll faster and the rows speed up and lean into the motion; scroll back and they reverse. Solid and outline rows alternate.