Toggle Sidebar B
AppearanceLight & dark mode D

Cubes

3D rotating cube cluster. Supports auto-rotation or hover interaction.

Default

Hover the grid to tilt the cubes around the pointer, and click to send a ripple across the faces. When the pointer is idle for three seconds the grid animates by itself.

Dark previewReplay previewOpen in new tab

Customize

Border Style
Grid Size8
Max Angle45°
Radius3

API Reference

Cubes

PropTypeDefaultDescription
gridSizenumber10The size of the grid (number of cubes per row/column).
cubeSizenumberundefinedFixed size of each cube in pixels. If not provided, cubes will be responsive.
maxAnglenumber45Maximum rotation angle for the tilt effect in degrees.
radiusnumber3Radius of the tilt effect (how many cubes around the cursor are affected).
easingstring'power3.out'GSAP easing function for the tilt animation.
durationobject{ enter: 0.3, leave: 0.6 }Animation duration for enter and leave effects.
cellGapnumber | objectundefinedGap between cubes. Can be a number or object with row/col properties.
borderStylestring'1px solid #fff'CSS border style for cube faces.
faceColorstring'#120F17'Background color for cube faces.
shadowboolean | stringfalseShadow effect for cubes. Can be boolean or custom CSS shadow.
autoAnimatebooleantrueWhether to automatically animate when user is idle.
rippleOnClickbooleantrueWhether to show ripple effect on click.
rippleColorstring'#fff'Color of the ripple effect.
rippleSpeednumber2Speed multiplier for the ripple animation.

Accessibility

Keyboard shortcuts and ARIA behavior.

  • Pointer and touch only, and purely decorative. Keep it out of the tab order and do not put essential content inside the cubes.