Box 3D
Render a dimensional box with individually styled faces.
Preview
Import
import { Box3D } from "@sigil-ui/components";Usage
<Box3D className="w-full max-w-sm p-8" hoverLift><strong>Token-driven surfaces</strong><p>Move over the panel to explore its depth.</p></Box3D>Props
| Prop | Type | Default | Description |
|---|---|---|---|
depth | number | 20 | Depth of the box in px. |
tiltX | number | -10 | X-axis tilt in degrees. |
tiltY | number | 20 | Y-axis tilt in degrees. |
perspective | number | 800 | Perspective distance in px. |
variant | "container" | "card" | "panel" | container | Preset variant. |
hoverLift | boolean | false | Lift on hover. |
Token integration
| CSS Variable | Purpose |
|---|---|
--s-border | Border |
--s-shadow-md | Shadow md |
--s-border-strong | Border strong |
--s-surface | Surface |
--s-surface-elevated | Surface elevated |
--s-duration-fast | Duration fast |
--s-easing-standard | Easing standard |
--s-box-3d-min-height | Box 3d min height |
--s-box-3d-min-width | Box 3d min width |