# Octopus

A mantle and eight arms face on. Each arm is its own spine on its own phase, length and curl, and they are mounted on a ring round the mouth rather than fanned in a line.

> 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-octopus.json
```

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

## Notes

- The independent phase per arm is the whole point: run them in lockstep and it reads as a rosette rather than an animal.
- Arms are on a ring, so the ones round the back draw first and shorter. Front elevation implies that; the other three cameras show it.
- Reaching modulates each arm's curl by how nearly it points at the pointer. It is a bias on a trajectory, not an inverse-kinematic solve — the mantis is the machine here with a real target.

## Usage

```tsx
import { RobotOctopus } from "@/components/ui/robot-octopus"

<RobotOctopus behavior="crawl" arms={8} />

// Or drive the arms and the mantle yourself.
<RobotOctopus phase={0.3} curl={0.8} jet={0.6} gather={0.4} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"front"` | Where the camera stands. One animal, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `behavior` | `"crawl" | "jet" | "furl" | "static"` | `"crawl"` | What it does when phase is not supplied: work the arms, pump the mantle with the arms streamed back, or ball up. |
| `phase` | `number` | — | Controlled cycle fraction. Supplying it stops the internal clock. |
| `speed` | `number` | `0.55` | Arm cycles per second. |
| `offset` | `number` | `0` | Seconds of offset, so a pair break step. |
| `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. |
| `arms` | `number` | `8` | Arms round the mouth, clamped to 4–10. |
| `segments` | `number` | `10` | Links in each arm, clamped to 3–24. |
| `curl` | `number` | — | Arm curl, 0 straight to 1 coiled. Omit and the behavior works them. |
| `jet` | `number` | — | Mantle contraction, 0 full to 1 squeezed onto the siphon. Omit and the behavior works it. |
| `gather` | `number` | — | How far the arms stream back, 0 fanned to 1 gathered. Omit and the behavior decides. |
| `interactive` | `boolean` | `true` | The arms nearest the pointer straighten and lengthen toward it while the rest curl away; a click jets. |
| `onJet` | `() => void` | — | Fired on the click that pumps the mantle. |
| `showGround` | `boolean` | `true` | The seabed line. |
| `label` | `string` | — | Caption underneath the animal. |
| `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/robot-octopus.tsx`
