Cube

Turns a lattice of dots a quarter at a time, the way a puzzle cube twists.

Configurations

Supported configurations for this component.

Configurations

3 examples
Default
Dense
Paused

Add to your project

One command adds this component to your project.

1

Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.

npx shadcn@latest add @aicanvas/••••••••••••

Light and dark both come with the install and follow the dark class on <html>, the shadcn dark mode setup (next-themes with attribute="class").

Props

Every prop this component accepts. Any other prop is forwarded to the underlying element.

PropTypeDefaultDescription
density'default'|'dense'-dots per edge (15 or 18); defaults to 'default'
seednumber-move script and entrance — same seed, same sequence, every render
pausedboolean-hold the cube still on its composed frame
colorstring-lattice dot ink; defaults to text.muted. Any CSS colour syntax. Depth is alphas of THIS value, so one prop recolours the whole lattice.
lightColorstring-the lit dots' ink; defaults to text.primary.
classNamestring-Additional CSS classes applied to the root element.

More Andromeda Pro components