Archived docs Get your API Key
Get started
Tutorials
Guides
Reference
Help for AI agents
🤖 AI Assistant

Component shape/3dbox

Component ID: shape/3dbox

A 3D box with 6 independently-styled faces (front, back, left, right, top, bottom) that can rotate in 3D space. Specify an origin rotation/zoom state and a destination state, and the box animates between them. Each face can have its own background image or color. Perfect for 3D photo displays, product showcases, or creative 3D transitions.

SectionAnimated geometric shapes, rectangles, polygons, cutouts, and custom HTML/SVG
AnimationBox rotates from origin (rotateX/Y/Z, zoom, position) to destination state with configurable duration and easing.
Intro duration5 s

Preview

Element schema

Minimal shape of a shape/3dbox component element:

{
    "type": "component",
    "component": "shape/3dbox",
    "settings": {}
}

See the full component element reference for shared properties like duration, start, x, y, etc.

Settings

The settings property accepts the following groups. Each group contains CSS-like properties; see component CSS properties for the full list of supported keys.

size

Box dimensions.

PropertyTypeDefaultDescription
widthstring400pxBox width (e.g. '20vw').
heightstring300pxBox height.
depthstring50pxBox depth.

front

Front face styling. Same properties for back, left, right, top, bottom.

PropertyTypeDefaultDescription
background-imagestringFace background image URL.
background-sizestringcoverBackground size.
background-positionstringcenterBackground position.
backgroundstringBackground color.

origin

Initial state of the 3D box.

PropertyTypeDefaultDescription
xstringX position (e.g. '50%').
ystringY position.
zoomstringZoom level.
rotateXstringX rotation (e.g. '0deg').
rotateYstringY rotation.
rotateZstringZ rotation.

destination

Final state of the 3D box (same properties as origin).

PropertyTypeDefaultDescription
xstringX position.
ystringY position.
zoomstringZoom level.
rotateXstringX rotation.
rotateYstringY rotation.
rotateZstringZ rotation.

animation

Animation timing.

PropertyTypeDefaultDescription
durationnumber2000Duration in ms.
easingstringeaseOutQuadAnime.js easing.