Surfacesstable
Diorama
Layered parallax
Near and far layers that move at different speeds, so a flat composition gains real depth.
Halo One
Wireless · $24940 h batteryNoise cancellingUSB-C
Sharp product on the far plane, labels at mid depth, blurred shapes up close
Use it when a hero, product shot or poster needs depth: the background stays sharp, nearer planes move further and blur more.
Customize
Opticshow strongly depth separates the layers
46 px
parallax7 px
blur1200 px
perspective0 °
tilt0.110
easeUsage
import { Diorama } from "zerogravity/diorama"
<Diorama
background={<ProductCard />}
planes={[
{ content: <SpecLabels />, depth: 0.5 },
{ content: <SoftShapes />, depth: 1 },
]}
/>Generated from the controls above. Only props that differ from their defaults are shown.
Props
| Property | Type | Default | Description |
|---|---|---|---|
parallax | number | 46 | Parallax. Range 0 to 140 px. |
blur | number | 7 | Foreground blur. Range 0 to 24 px. |
perspective | number | 1200 | Perspective. Range 400 to 2400 px. |
tilt | number | 0 | Tilt. Range 0 to 20 °. |
ease | number | 0.11 | Ease. Range 0.02 to 1. |
background | ReactNode | — | The deepest layer, never blurred. |
planes | DioramaPlane[] | [] | Layers in front of the background, ordered far to near: { content, depth 0–1, blur?, opacity? }. |
Dependencies
0 external runtime dependencies
Ships with nothing but React.