A photo that tilts in 3D toward the pointer while its background, middle and foreground layers drift at different depths, with a moving glare. It sways on its own until touched.
Layered scenes
Sky, skyline and street shift at different depths as the card tilts.
depth 14pxnpx shadcn@latest add https://hyperblur.dev/r/image-parallax-tilt.jsonWorks in any React project set up with the shadcn CLI. The file lands in components/hyperblur/image-parallax-tilt.tsx.
import { ImageParallaxTilt } from "@/components/hyperblur/image-parallax-tilt"
<ImageParallaxTilt images={["/poster.jpg"]} maxTilt={12} width={320} />| Prop | Type | Default | Description |
|---|---|---|---|
| images | string[] | Image URLs. When empty or missing, four built-in gradient and SVG scenes are used. | |
| alt | string | "Photo" | Base accessible name. Each slide is announced as the alt text followed by its position, for example Photo 2 of 4. |
| width | number | string | "100%" | CSS width of the component. |
| height | number | string | CSS height. When omitted the height follows `aspect`. | |
| aspect | string | "16 / 10" | CSS aspect-ratio used when `height` is not set. |
| index | number | Controlled slide index. Pair with onChange. | |
| defaultIndex | number | 0 | Initial slide index when uncontrolled. |
| onChange | (index: number) => void | Called with the new slide index after every change, including automatic ones. | |
| maxTilt | number | 10 | Maximum tilt in degrees on each axis. |
| depth | number | 14 | Layer travel in pixels. The foreground moves by this amount, the background by half of it in the opposite direction. |
| perspective | number | 900 | Perspective distance in pixels. |
| glare | boolean | true | Show the light sheen that follows the pointer. |
| accent | string | "#2f7bff" | Color of focus rings and highlights. |