# Utility droid

A compact cylindrical utility unit with interchangeable domes, two chassis layouts, rotating optics, and deployable service tools.

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

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

## Notes

- Uncontrolled it patrols and sweeps its head; alert overrides whatever behavior says and stands it to guard. Pose it yourself and the stance is yours while the head keeps scanning.
- Front elevation is the drawing it always had. The barrel is round in plan and the legs are set round it rather than side by side, which is the thing one elevation could not say.
- The dome and the tool are controlled when you supply them and self-running when you do not — the usual rule. Pointer tracking beats the behaviour while the pointer is over it.
- All three series share one chassis API; the series changes panel geometry rather than character branding.

## Usage

```tsx
import { UtilityDroid } from "@/components/ui/utility-droid"

<UtilityDroid series="navigator" dome="faceted" legMode="three" headAngle={32} tool="scanner" toolExtension={0.8} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"front"` | Where the camera stands. One droid, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `series` | `"workshop" | "navigator" | "rescue"` | `"workshop"` | Changes the functional front-panel module. |
| `dome` | `"round" | "flat" | "faceted"` | `"faceted"` | Selects the upper sensor-shell silhouette. |
| `legMode` | `"two" | "three"` | `"three"` | Uses two side legs or adds a central stabilizer. |
| `headAngle` | `number` | — | Sensor heading in degrees, clamped to −150..150. Omit and the dome turns itself — to the pointer, or with the behaviour. |
| `tool` | `"none" | "interface" | "gripper" | "scanner"` | `"interface"` | Deployable side-mounted service tool. |
| `toolExtension` | `number` | — | Tool travel normalized to 0–1. Omit and the behaviour runs the tool out and stows it. |
| `behavior` | `"work" | "scan" | "idle" | "static"` | `"work"` | Work turns to the bench, runs the tool out, holds it there and stows it; scan sweeps the dome; idle drifts. |
| `speed` | `number` | `0.22` | Work 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` | The dome is the droid's attention: it turns to the pointer while it is over the drawing, and goes back to work when it leaves. |
| `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/utility-droid.tsx`
