sigilUI

Box 3D

Render a dimensional box with individually styled faces.

@sigil-ui/componentsReact

Preview

Live preview Interactive

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

PropTypeDefaultDescription
depthnumber20Depth of the box in px.
tiltXnumber-10X-axis tilt in degrees.
tiltYnumber20Y-axis tilt in degrees.
perspectivenumber800Perspective distance in px.
variant"container" | "card" | "panel"containerPreset variant.
hoverLiftbooleanfalseLift on hover.

Token integration

CSS VariablePurpose
--s-borderBorder
--s-shadow-mdShadow md
--s-border-strongBorder strong
--s-surfaceSurface
--s-surface-elevatedSurface elevated
--s-duration-fastDuration fast
--s-easing-standardEasing standard
--s-box-3d-min-heightBox 3d min height
--s-box-3d-min-widthBox 3d min width