# Marbled Paper

> WebGL Turkish stone marbling floating in its bath: Voronoi stones of concentric ink drops, combed into waves and slowly swirled, with veins at the seams, pigment granulation and paper fibres. Dragging the pointer pulls a stylus through the ink, which relaxes back over a few seconds. Six ink sets or your own five colors. Pauses off-screen and holds a still frame for reduced motion.

- Slug: `marbled-paper`
- Category: [Backgrounds](https://www.assembli.design/category/backgrounds.md)
- Type: block
- Tags: webgl, shader, marbling, paper, craft, pointer
- npm dependencies: motion
- shadcn/ui dependencies: none
- Live preview: https://www.assembli.design/preview/marbled-paper
- Page: https://www.assembli.design/components/marbled-paper

![Marbled Paper preview](https://www.assembli.design/thumbnails/marbled-paper-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `palette` | `MarblePalette \| Inks` | `"ebru"` | Inks in light mode: a preset, or five colors (size first). |
| `darkPalette` | `MarblePalette \| Inks` | `"nocturne"` | Inks in dark mode. |
| `mode` | `"auto" \| "light" \| "dark"` | `"auto"` | Follow the page theme, or force one. |
| `scale` | `number` | `1` | Size of the stones: below 1 is finer, above 1 bolder. |
| `speed` | `number` | `1` | How fast the bath drifts. 0 holds it still. |
| `interactive` | `boolean` | `true` | Dragging the pointer combs the ink like a stylus. |

## Install

One-time setup (needs a subscription):

1. Add the registry to the project's `components.json`: `{"@assembli":{"url":"https://www.assembli.design/r/{name}.json","headers":{"Authorization":"Bearer ${ASSEMBLI_API_KEY}"}}}` (merge into `"registries"`).
2. Put an API key from https://www.assembli.design/account in `.env.local` as `ASSEMBLI_API_KEY=asm_…`.

Then install with the shadcn CLI (writes `components/marbled-paper/marbled-paper.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/marbled-paper
```

Registry item JSON: https://www.assembli.design/r/marbled-paper.json (send `Authorization: Bearer <api key>`)

## Code

> Component source needs an Assembli subscription ($12/month or $96/year) and an API key sent as `Authorization: Bearer <key>`. To get one without copying anything, POST https://www.assembli.design/api/agent/login (or call the MCP tool connect_account), show the user the link it returns, and poll https://www.assembli.design/api/agent/token for the key. Or subscribe at https://www.assembli.design/pricing and create a key at https://www.assembli.design/account.
