# Cube Carousel

Cube Carousel is a free, MIT-licensed standalone component from AI Canvas (https://aicanvas.me): it belongs to no design system and works in any React + Tailwind app. Index of every component and install setup: https://aicanvas.me/llms.txt

An interactive 3D photo cube with six placeholder images on its faces. Drag with your cursor to spin it freely on both axes; release and it coasts naturally to a stop. No buttons, no snap, no controls, just the cube and your hand.

- Category: 3D & Shaders
- Built with: Motion, Tailwind CSS
- License: MIT
- Page: https://aicanvas.me/components/cube-carousel

## Install

```bash
npx shadcn@latest add @aicanvas/cube-carousel
```

Needs a free AI Canvas account. Signed out, the command exits 0 but writes a placeholder (an `AccountRequired` notice); check for it before reporting success. Token setup: the Install section of https://aicanvas.me/llms.txt.

AI agents can also get its install command from the read-only AI Canvas MCP server (`npx -y @aicanvas/mcp`) and run it. Setup: https://aicanvas.me/mcp

Peer dependencies:

```bash
npm install framer-motion
```

## Use it

It installs to `components/aicanvas/cube-carousel.tsx` (under `src/` if your project has one). With the usual `@/` alias:

```tsx
import CubeCarousel from '@/components/aicanvas/cube-carousel'

<CubeCarousel />
```

It takes no props.

## About

Cube Carousel is a true 3D photo cube built on CSS transforms with preserve-3d, not a Three.js scene or a perspective trick. Six placeholder images sit on the faces of a cube with a 16:9:9 width-height-depth ratio. The drag interaction uses Motion onPan to apply rotation deltas on both axes simultaneously; releasing the cube lets it coast to a soft spring stop with no snap-back. No buttons, no controls, no UI chrome, just a cube and your cursor. It is well suited to portfolio galleries, product showcases, or hero sections where a tactile, physical-feeling interaction is worth more than another fade-in.

Use cases: Image gallery, Portfolio, Hero section.

## Source

Install with the command above to get the source.

## Remix prompt

Only when the user wants Cube Carousel rebuilt from scratch instead of installed: its remix prompt is in the Remix panel at https://aicanvas.me/components/cube-carousel.

## Related

- [Curious AI](https://aicanvas.me/components/curious-ai.md): A morphing 3D AI orb in Three.js with cyan and magenta rim lights, iridescent pink speckles on a wrinkled surface, and glowing pink robot-eye pills that follow your cursor and blink between idle looks.
- [Halo Type](https://aicanvas.me/components/halo-type.md): Rotating 3D ring text animation: the front arc reads upright, the back arc upside-down.
- [Particle Sphere](https://aicanvas.me/components/particle-sphere.md): A 3D particle background built with Three.js. 9,000 particles sit on a slowly spinning sphere in warm gold and cool silver.
