Component packs › Darkroom › Depth Tilt
One flat photo becomes two layers that slide apart on springs as you move or tilt the phone, the shadow shifting the other way.
Depth Tilt is a parallax from Darkroom, a component pack with 7 effects: Seven photo effects that work on real photos, not on drawings of them. Price: $2 for the whole pack.
Built with: two layers from one photo, spring parallax, device tilt.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
light | boolean | ||
autoplay | boolean | ||
src | string | ||
depth | number | How far the near layer moves, in px at the edge. |
destroy(): voidimport DepthTilt from './DepthTilt';
<DepthTilt />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Image effect components.