# SCARA

A SCARA cell from directly above: two rotary links, a Z spindle, and the swept area you actually plan a line around.

> 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/scara-arm.json
```

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

## Usage

```tsx
<ScaraArm behavior="orbit" z={0.6} tool="vacuum" showEnvelope />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"plan"` | Where the camera stands. One cell, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `links` | `number[]` | `[1, 0.85]` | Relative lengths of the two rotary links. |
| `reach` | `number` | `46` | Total stretch. |
| `z` | `number` | `0.35` | Spindle extension, 0 retracted to 1 fully down. |
| `target` | `Vec2 | ((clock: number) => Vec2) | null` | — | Controlled tip position in the plane. |
| `behavior` | `"pointer" | "orbit" | "sweep" | "idle" | "static"` | `"orbit"` | What drives the tip. |
| `showShadow` | `boolean` | `true` | Offset silhouette on the table — how the Z height reads. |
| `showEnvelope` | `boolean` | `true` | Dashed annulus for the swept area. |
| `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. |
| `thickness` | `number` | `1` | Limb weight multiplier, independent of size. |
| `speed` | `number` | — | Tip travel in world units per second. |
| `animate` | `boolean` | `true` | Off snaps to a fixed goal or samples a scripted path at phase, then stops. Reduced-motion preference does the same. |
| `paused` | `boolean` | `false` | Freeze in place. |
| `phase` | `number` | `0` | Seconds of offset, so a row of machines breaks step. |
| `interactive` | `boolean` | `false` | Press and drag inside the frame to send the tool there; release and it eases back into its behaviour. Hover is not available on a touch screen, so this is how one drives it. |
| `onTargetChange` | `(target: Vec2 | null) => void` | — | The dragged goal in world units, and null on release. |
| `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/scara-arm.tsx`
