# Stage

The room the 3D robots stand in: lights, a contact shadow, an optional grid floor, and orbit controls.

> For the complete index, see [llms.txt](https://robocn.dev/llms.txt). A Markdown version of any page is available by appending `.md` to its URL or by sending an `Accept: text/markdown` header.

## Install

```bash
bunx --bun shadcn@latest add https://robocn.dev/r/robot-stage.json
```

Registry item: `robot-stage` · [`https://robocn.dev/r/robot-stage.json`](https://robocn.dev/r/robot-stage.json)

## Usage

```tsx
<RobotStage camera={[3.6, 2.6, 4.6]} floor="grid" autoRotate>
  <RobotArm3D behavior="sweep" />
</RobotStage>
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `camera` | `[number, number, number]` | `[3.6, 2.6, 4.6]` | Camera position. The default frames a 2.5-unit machine. |
| `fov` | `number` | `40` | Field of view. |
| `controls` | `boolean` | `true` | Drag to orbit. Off makes the stage a static illustration. |
| `autoRotate` | `boolean` | `false` | Turn slowly. |
| `orbit` | `"ground" | "free"` | `"ground"` | How far round the camera may go. `ground` keeps it above the floor, which is what a machine standing on one wants; `free` goes over the top and under the bottom, for something you hold — a cube whose every side you want to see. |
| `pauseOnHover` | `boolean` | `true` | Stop the auto-rotation while the pointer is over the stage, so a machine can be looked at without chasing it round. |
| `floor` | `"grid" | "shadow" | "none"` | `"shadow"` | Floor treatment under the machine. |
| `canvasProps` | `Partial<CanvasProps>` | — | Anything else the react-three-fiber canvas takes. |

## Source

- `src/components/ui/robot-stage.tsx`
