# Staircase

> Stepped staircase with per-step colliders: solid (a built-in stair on a floor) or floating (thin treads on sloped stringers, open underneath, to span a void).

## Add it

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

Pulls `@react-three/rapier@^2.2.0`, `@runek/core@^0.15.0`.

## Use it

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

<Staircase position={[0, 0, 0]} />
```

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

```json
{ "type": "Staircase", "props": { "position": [0, 0, 0] } }
```

## 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. |
| `seed` | `number` |  | Accepted for the component contract; this component has no seeded variation yet. |
| `steps` | `number` | `6` |  |
| `totalHeight` | `number` | `1.5` | Total rise, in units. Ascends along +y and +z from the origin. |
| `width` | `number` | `1.2` | Width, in units. |
| `depth` | `number` | `2.4` | Total run (depth), in units. |
| `form` | `"solid" \| "floating"` | `"solid"` | `solid` fills each step down to the origin, a built-in stair that sits on a floor. `floating` lays thin treads on two sloped stringers, open underneath, for a flight that spans a void (an atrium, a loft, a mezzanine). |
| `color` | `color` | palette `stone` | Defaults to the world palette's `stone` slot. |

## Registry manifest

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

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