# Cubes · Pro

A grid of CSS 3D cubes that tip toward the pointer and ripple outward from wherever you click. Every cube is a button, so the ripple works from the keyboard too.

This is a Charcoal UI Pro component. Its source and examples are available with a Pro seat: https://charcoalui.com/pricing

## With a Pro seat

1. Add the registry to components.json:

```json
{
  "registries": {
    "@charcoal": {
      "url": "https://charcoalui.com/r/{name}.json",
      "headers": {
        "Authorization": "Bearer ${CHARCOAL_LICENSE_KEY}"
      }
    }
  }
}
```

2. Copy your licence key from https://charcoalui.com/dashboard and put it in .env.local as CHARCOAL_LICENSE_KEY, then:

```bash
npx shadcn@latest add @charcoal/cubes
```

To read Pro source through this MCP server, reconnect it with the header "Authorization: Bearer <licence key>".

## API — Cubes
| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `size` | `number` | `48` | Cube edge in px. |
| `gap` | `number` | `10` | Space between cubes in px. |
| `rows` | `number` | `4` |  |
| `cols` | `number` | `6` |  |
| `tilt` | `number` | `40` | Maximum tip toward the pointer, in degrees. |
| `autoRipple` | `boolean` | `true` | Fire a ripple from a random cube every few seconds while the pointer is away. |
| `className` | `string` | — |  |

See it live: https://charcoalui.com/docs/components/cubes