> A component of a Premium AI Canvas design system. Index of every system, component and install setup: https://aicanvas.me/llms.txt

# Cube (Andromeda Pro)

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

- Design system: [Andromeda Pro](https://aicanvas.me/design-systems/andromeda-pro.md)
- License: Premium (proprietary)
- Install slug: `andromeda-pro-cube`
- Page: https://aicanvas.me/design-systems/andromeda-pro/cube

## Install

```bash
npx shadcn@latest add @aicanvas/andromeda-pro-cube
```

Requires Premium. Without a Premium token the command writes a placeholder instead of the component.

Every Andromeda Pro component at once: `npx shadcn@latest add @aicanvas/andromeda-pro`.

Token setup: the Install section of https://aicanvas.me/llms.txt.

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `density?` | `'default'\|'dense'` |  | dots per edge (15 or 18); defaults to 'default' |
| `seed?` | `number` |  | move script and entrance — same seed, same sequence, every render |
| `paused?` | `boolean` |  | hold the cube still on its composed frame |
| `color?` | `string` |  | lattice dot ink; defaults to text.muted. Any CSS colour syntax. Depth is alphas of THIS value, so one prop recolours the whole lattice. |
| `lightColor?` | `string` |  | the lit dots' ink; defaults to text.primary. |
| `className?` | `string` |  | Additional CSS classes applied to the root element. |

## Remix prompt

The public part of this component's remix prompt. The rest of the build spec is part of Premium.

````markdown
Build **Cube**: a lattice of dots on the six faces of a cube, seen from above one corner, that holds still, then makes one move and settles: either the whole cube turns a quarter, or one of its three slices twists a quarter, the way a puzzle cube turns. One whole face is lit: three twists scramble it, the whole cube turns, and three twists put it back together. React + TypeScript, one file, named export `Cube`.

It is drawn to sit on a near-black ground, `oklch(0.135 0.002 286.2)`. The component never paints that ground itself: the canvas stays transparent and only the dots are drawn on it. Pure decoration: `aria-hidden="true"` on the host and on the canvas, no `role`, no text alternative.

Everything is deterministic from `seed`. Use **mulberry32**, never `Math.random()`:

```
function mulberry32(a) {
  return function () {
    a |= 0; a = (a + 0x6d2b79f5) | 0;
    let t = Math.imul(a ^ (a >>> 15), 1 | a);
    t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
    return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
  };
}
```
````

## More Andromeda Pro components

- [Accordion](https://aicanvas.me/design-systems/andromeda-pro/accordion.md)
- [Alert](https://aicanvas.me/design-systems/andromeda-pro/alert.md)
- [Artifact](https://aicanvas.me/design-systems/andromeda-pro/artifact.md)
- [Avatar](https://aicanvas.me/design-systems/andromeda-pro/avatar.md)
- [Badge](https://aicanvas.me/design-systems/andromeda-pro/badge.md)
