Cube

Idles on its own. Grab it and spin it.

Install it the shadcn way: copy the source file into your project. It uses CSS 3D, Tailwind CSS v4 and Framer Motion, no WebGL.

Cube3D props

PropTypeDefaultDescription
facesReactNode[]Faces in order: front, right, back, left, top, bottom.
sizenumber180Edge length in px.
speednumber18Degrees per second of idle rotation on Y. 0 disables.
perspectivenumber900Perspective distance in px. Lower values look more dramatic.
classNamestringExtra classes added to the outer element.
faceClassNamestringExtra classes added to each face.

Read the guide

CSS 3D Transforms Without WebGL: Perspective, preserve-3d and the Gotchas

More components

Guides

Start

Cards

Scenes

Controls & text

Buttons

More cards

UI elements

Form controls

App components

Text & backgrounds

Showpieces

Blocks