# Reachy mini

A companion robot: a head on a six-rod parallel platform, driven in six degrees of freedom, with pointer-tracking eyes and sprung antennas.

> 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/reachy-mini.json
```

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

## Notes

- The whole robot is modelled in world units and the Stewart solve is already three-dimensional, so a view is only a change of projection. `iso` is its own axonometric; the other three are the shared orthographic cameras.
- Every frame of the idle, the scan and the nod goes through the same inverse kinematics as a pose you supply: the motion is six changing leg lengths, not a transform on the picture.
- The linkage is solved: six leg lengths from real Stewart platform inverse kinematics, projected isometrically and depth-sorted. The head shell is an illustration that takes roll from the pose and shifts its face with yaw and pitch.
- A pose that asks a leg for more than its travel lights the fault lamp and paints that rod in the accent colour. The component clamps its own inputs, so faults come from tightening geometry.travel.
- Eye tracking is pointer-driven through use-pointer-target; pass look to control it, or track={false} to hold the gaze still.

## Usage

```tsx
import { ReachyMini } from "@/components/ui/reachy-mini"

<ReachyMini behavior="scan" />

// Any axis you supply is yours; the rest keep breathing.
<ReachyMini yaw={18} pitch={-8} antennaLeft={22} antennaRight={-10} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"iso"` | Where the camera stands. One robot, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `behavior` | `"idle" | "scan" | "nod" | "static"` | `"idle"` | What the platform does with any axis you have not supplied: breathe, sweep the room, or nod. |
| `sway / heave / surge` | `number` | — | Head translation in world units: right, up, and toward the viewer. Clamped to ±10, ±8, ±10. Omit and the behavior drives it. |
| `roll / pitch / yaw` | `number` | — | Head rotation in degrees, clamped to ±24, ±24, ±30. Positive pitch tips the face down. Omit and the head turns toward the pointer instead. |
| `speed` | `number` | `0.35` | Cycles 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` | `true` | Turn the head toward the pointer — not just the pupils — and nod once when clicked. |
| `onNod` | `() => void` | — | Fired on the click that starts a nod. |
| `look` | `Vec2 | null` | `null` | Pupil aim in −1..1 on both axes. Set it to drive the gaze; leave it null to track the pointer. |
| `track` | `boolean` | `true` | Follow the pointer anywhere on the page while look is null. |
| `blink` | `boolean` | `true` | Occasional blink, disabled by a reduced-motion preference. |
| `antennaLeft / antennaRight` | `number` | — | Antenna angles in degrees, clamped to ±45. Omit and they trail the head, springing back after a turn or a nod. |
| `showLinkage` | `boolean` | `true` | Draw the six rods, their bearings, and the platform disc. |
| `showGround` | `boolean` | `true` | Contact shadow under the body. |
| `geometry` | `Partial<StewartGeometry>` | — | Override ring radii, anchor spread, platform height, or actuator travel. |
| `label` | `string` | — | Caption under the robot. |
| `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/reachy-mini.tsx`
