# Wrist terminal

A wrist display on two solved mechanisms: a crown geared to the dial, and a constant-pitch link band that keeps its length however far it is opened.

> 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/wrist-terminal.json
```

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

## Notes

- The crown is geared to the dial. A detent is 360 divided by `ticks`, so one turn is one pass of the face and the hand can never point somewhere the reading disagrees with. It wraps in both directions.
- The band is a constant-pitch chain: the link count and the pitch are fixed and only the curvature changes, so opening it cannot make the strap longer. It is the travelling-wave trick `spine-kinematics` uses — integrate a heading rather than move joints — applied to a bracelet.
- The knurl is surface, not texture. Each rib is a line on the crown's cylinder, drawn only while it faces the camera, which is what makes the crown read as turning from every angle instead of only head on.
- Because the band wraps away from you, the near links are sorted to paint last — a closed band drawn in link order draws itself inside out.
- No dynamics: no detent force, no torque, no clasp, no material. The band is drawn round nothing — there is no wrist model under it — and the display draws structure only.
- An original archetype. No manufacturer, product line, wordmark or paint scheme is reproduced here or in the demo.

## Usage

```tsx
import { WristTerminal } from "@/components/ui/wrist-terminal"

<WristTerminal ticks={12} closure={0.8} />

// Controlled, or a crown you can work with a finger.
<WristTerminal crown={120} screen="rings" />
<WristTerminal interactive onCrownChange={setCrown} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"front"` | Where the camera stands. One terminal, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `crown` | `number` | — | Controlled crown rotation in degrees. Omit it and the crown runs behavior. |
| `behavior` | `"dial" | "pulse" | "static"` | `"dial"` | Run the crown round a turn a cycle, or work the quarter turn a finger checking something does. |
| `ticks` | `number` | `12` | Detents in one turn of the crown, rounded and clamped to 4–24. |
| `closure` | `number` | `0.75` | How far the band is closed, 0 hanging open to 1 round a wrist. |
| `links` | `number` | `7` | Links in each half of the band, rounded and clamped to 4–12. |
| `speed` | `number` | `0.2` | Turns of the crown per second. |
| `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` | `false` | Drag round the face to work the crown, or arrow-key it a detent at a time. |
| `onCrownChange` | `(crown: number) => void` | — | Crown angle in degrees throughout a drag or a key press. |
| `screen` | `"dial" | "rings" | "off"` | `"dial"` | What the display is showing. Structure in palette roles, never an application's own artwork. |
| `label` | `string` | — | Caption below the state readout. |
| `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. |
| `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/wrist-terminal.tsx`
