Power-User Systems
Parallax Rail
A pinned section where scrolling down drives content sideways across depth planes moving at different rates.
Install
bun add motion clsx tailwind-mergeThen copy 2 files into your project:
- components/registry/parallax-rail/parallax-rail.tsx
- lib/utils.ts
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| planes | number | 3 | How many depth planes to render. |
| travel | number | 1 | Multiplier on the front rail's travel across the pin. |
| depthSpread | number | 0.45 | How much slower the backmost plane moves than the front. |
| damping | number | 30 | Spring damping on the scrub — higher tracks scroll exactly. |
| fadeEdges | number | 0.12 | Width of the soft mask at each rail edge. |
| railGap | number | 24 | Vertical gap between planes. |
What It Demonstrates
- Parallax
- Background and foreground move at different speeds while scrolling, creating depth.
- Scroll-driven animation
- An animation whose progress is tied directly to scroll position.
- Translate
- Move an element along the X or Y axis.
- Orchestration
- Deliberately timing multiple animations so they feel like one coordinated motion.
- Mask
- Hiding or revealing parts of an element using a shape or gradient — like clip-path, but with soft, fadeable edges.
- Compositing
- Letting the GPU move or fade an element on its own layer without redoing layout or paint.
Related Components
Mirage
Live, fully interactive HTML seen through moving air. An animated turbulence field displaces the real DOM subtree per pixel, with no snapshot and no canvas replica, so the text stays selectable, the button still takes focus and the link is still a link while the whole panel shimmers.
Ascii Engine
A lit, raymarched 3D solid rendered at exactly one pixel per character cell, then quantised into a glyph ramp drawn once with fillText. Drag to orbit it through a full three-sixty. Real geometry underneath, terminal on top, with no scene graph, no mesh, and no second library to get there.
Submerge
Live content held under water. A slow current bends it continuously, a press drops a stone and a drag leaves a wake that trails behind the cursor. The text underneath stays selectable, the button still answers and the link is still a link, because the water bends the real tree rather than a picture of it.
Masonry
A Pinterest-style grid where every item drops into the shortest column, packed by measurement rather than by a shared row baseline.
Pathfinder
A pathfinding visualizer on a grid. Watch A*, Dijkstra, breadth-first or greedy search spread through a maze, then draw the path it found. Drag to draw or erase walls, or drag the start and the goal to move them. The path updates while you draw. Left alone, it builds a new maze, solves it and starts over.
Command Palette
A cmdk command menu with a plain or liquid-glass surface and hotkey trigger.