# Monolith droid

A slab-bodied walker with no limbs: a rectangular column sliced into parallel slabs, each hinged at its own top face, that splay into a braced stance and stride half a cycle apart.

> 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/monolith-droid.json
```

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

## Notes

- Front elevation is the view it is drawn in. Every part is a cuboid in world units, and a face is drawn only when its rotated normal points at the camera, back to front by depth — so plan view is four end caps, front is the broad faces with a sliver of cap above them, and iso shows two faces of every slab.
- Face artwork — the collar, the seams, the pin holes, the readout — is drawn in the face's own world units under the affine matrix built from the projected face basis. A pin hole is a real circle on a real face, so it comes out as the right ellipse from every angle and collapses to a line when the face goes edge-on.
- No solver, and none is pretended: a slab is a rigid body on a one-axis hinge, so the pose is two rotations and a rise per slab. The gait is a scripted footfall cycle with no mass, balance or support polygon behind it — a closed column with a stride on it will walk on something that could not stand.
- The readout lights rows because it was told to. Nothing here reports a state or starts a timer.
- An original archetype — a slab walker — not a character. It carries no wordmark, insignia or paint scheme, and the label is the caller's.

## Usage

```tsx
import { MonolithDroid } from "@/components/ui/monolith-droid"

<MonolithDroid behavior="walk" slabs={4} onSplayChange={setSplay} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"front"` | Where the camera stands. One column, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `splay` | `number` | — | How far the column is open, 0 closed into one solid block to 1 braced. Supplying it stops the loop; the hinge angles are worked from it either way. |
| `behavior` | `"walk" | "unfold" | "brief" | "static"` | `"walk"` | Walk strides at a working splay with alternate slabs half a cycle apart; unfold opens and closes the column with the slabs still; brief stands near-closed and runs the readout. |
| `speed` | `number` | `0.5` | Cycles per second: one footfall pair, or one open and close. |
| `animate` | `boolean` | `true` | Off parks the machine at phase and stops rendering. A reduced-motion preference does the same. |
| `paused` | `boolean` | `false` | Freeze where it stands. |
| `phase` | `number` | `0` | Seconds of offset, so a row of machines breaks step. |
| `interactive` | `boolean` | `true` | Drag across it to pull the column open and closed, or use the arrow keys; Home closes it and End opens it. Release eases it back into the behaviour. |
| `onSplayChange` | `(splay: number) => void` | — | The opening a drag or a key moved it to, reported in controlled mode too. |
| `stride` | `number` | — | Controlled footfall phase, 0–1. Omit and the behaviour works the gait. |
| `panel` | `number` | — | Lit rows in the readout, 0–1, filling from the top. Omit and the behaviour works it. |
| `lean` | `number` | — | Whole-body tilt in degrees, clamped to ±14. Omit and the behaviour works it. |
| `slabs` | `number` | `4` | Slabs in the column, clamped to 3–6. The camera pulls back so a wider column still fits the frame. |
| `variant` | `"solid" | "outline" | "blueprint" | "wire"` | `"solid"` | How the machine is painted. Geometry never changes between variants. |
| `size` | `"xs" | "sm" | "md" | "lg" | "xl" | number` | `"md"` | Rendered width in pixels, or a step on the scale. |
| `showGround` | `boolean` | `true` | Draw the contact line or shadow beneath the droid. |
| `signal` | `"idle" | "ready" | "warning"` | — | Status-lamp state using neutral, accent, or shell colour; each component documents its visual default in the demo. |
| `label` | `string` | — | Optional technical caption under the drawing. |
| `color` | `string` | `var(--robot-shell)` | Body panels — the colour the machine reads as. |
| `accent` | `string` | `var(--robot-accent)` | Status colour: tip light, live tool, readouts. |
| `metal` | `string` | `var(--robot-metal)` | Bare machined parts: collars, bolts, tool bodies. |
| `dark` | `string` | `var(--robot-dark)` | Cast joints, base, shadow side. |
| `palette` | `Partial<RobotPalette>` | — | Override any subset of roles at once, including glow and grid. |

## Source

- `src/components/ui/monolith-droid.tsx`
