# Book

> A single procedural book — standing, lying, or open — with a seeded cover and optional click interaction; the standalone sibling of Bookshelf's instanced spines.

## Add it

```bash
npx @runek/cli add book
```

Pulls `@react-three/drei@^10.7.7`, `@react-three/fiber@^9.6.1`, `@runek/core@^0.15.0`, `three@^0.184.0`.

## Use it

```tsx
import { Book } from './runek/Book'

<Book position={[0, 0, 0]} seed={1} />
```

Or as a node in a world file ([worlds as data](https://runek.nullorder.org/docs/worlds-as-data.md)):

```json
{ "type": "Book", "props": { "position": [0, 0, 0], "seed": 1 } }
```

## Props

| Prop | Type | Default | Description |
|---|---|---|---|
| `position` | `[x, y, z]` | `[0, 0, 0]` | Position [x, y, z] in units (1 unit = 1 m, Y-up). |
| `rotation` | `[x, y, z]` | `[0, 0, 0]` | Euler rotation [x, y, z] in radians. |
| `width` | `number` | `0.22` | Cover width (spine to fore-edge), in units. |
| `height` | `number` | `0.3` | Spine length, in units. |
| `thickness` | `number` | `0.05` | Closed page-block thickness, in units. |
| `pose` | `"standing" \| "lying" \| "open"` | `"lying"` | `lying` rests on its back cover (spine on the -x edge); `standing` stands upright on its bottom edge; `open` lies opened flat at the spine. |
| `color` | `color` |  | Cover color. Defaults to a seeded cloth-bound color. |
| `pageColor` | `color` | `"#efe7d2"` |  |
| `title` | `string` |  | Shown as a hover label when the book is interactive. |
| `href` | `string` |  | Navigated to on click when no `onSelect` is given. |
| `onSelect` | `function` (code only) |  | Called on click. Optional, so the book still renders from data. |
| `reach` | `number` | `3` | How close the player's avatar (its eyes) must be to hover or click the book, in units. Only applies while a `Player` is mounted; with a free camera it's always in reach. |
| `seed` | `number` | `1` | Seed for the deterministic variation: same seed, same result. |

## Registry manifest

[https://runek.nullorder.org/r/components/book.json](https://runek.nullorder.org/r/components/book.json): Self-contained JSON: inlined source plus resolved dependencies, exactly what `runek add book` fetches.

Browse the whole catalog in the **[gallery →](https://runek.nullorder.org/gallery)**.
