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 — no snapshot, 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 — and 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 — and 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.
Command Palette
A cmdk command menu with a plain or liquid-glass surface and hotkey trigger.
Physics Engine
A from-scratch 2D rigid-body physics lab — fixed-timestep impulse solver, drag-to-throw bodies, force and velocity overlays, and a live energy readout on a blueprint grid.
Black Hole
A real-time Schwarzschild black hole raytraced per-pixel in a WebGL2 shader — null geodesics bend a lensed accretion disk over the event horizon, with Doppler beaming, gravitational redshift, a photon ring, and a lensed starfield, all under a cinematic orbit.