# Fan

> Kami pack: a folding fan of fifteen paper pleats on bamboo ribs, its leaf painted with a sun and a border that fold with the pleats. It fans itself gently. A tap snaps it shut, then flicks the guard round so the pleats peel open one after another and settle with a shiver. Plain kami, printed washi or crinkled foil. Raymarched in WebGL.

- Slug: `kami-fan`
- Category: [Asset packs](https://www.assembli.design/category/asset-packs.md)
- Subcategory: [Kami](https://www.assembli.design/category/asset-packs/kami.md) (`kami`)
- Type: component
- Tags: 3d, webgl, raymarching, asset, origami, paper, fan, sensu, pleats, accordion, bamboo
- npm dependencies: none
- shadcn/ui dependencies: none
- Live preview: https://www.assembli.design/preview/kami-fan
- Page: https://www.assembli.design/components/kami-fan

![Fan preview](https://www.assembli.design/thumbnails/kami-fan-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `palette` | `KamiPalette` |  | A preset palette. Every piece in the pack reads the same sheets. |
| `colors` | `Partial<KamiColors>` |  | Override any color of the palette, as any CSS color. |
| `studio` | `string` |  | The room the piece sits in, as any CSS color. It tints the fill light and what foil reflects. By default it's a warm paper white, or a deep ink blue on dark surfaces. |
| `finish` | `KamiFinish` |  | Plain kami, printed washi or crinkled foil. Changing it crossfades. |
| `print` | `KamiPrint` |  | The pattern washi is printed with. |
| `speed` | `number` |  | Idle motion speed. 0 holds the resting pose; reduced motion always does. |
| `interactive` | `boolean` |  | Lean toward the cursor, drag to turn and fling, tap for the piece's trick. |
| `poke` | `number` |  | Change this value to play the piece's tap trick on cue. |
| `shadow` | `boolean` |  | The soft shadow the piece casts on the ground beneath it. |
| `surface` | `"auto" \| "light" \| "dark"` |  | What the piece sits on. "auto" follows the page theme; set "light" or "dark" when it sits on its own backdrop. |
| `rotate` | `Vec3` |  | Extra rotation of the resting pose in degrees: [pitch, yaw, roll]. |

## 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/kami-fan/kami-fan.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/kami-fan
```

Registry item JSON: https://www.assembli.design/r/kami-fan.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.
