# Security droid

A tall angular guard robot with controlled patrol postures, a pointer-tracking sensor bar, and a visible alert state.

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

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

## Notes

- Front elevation is the drawing it always had. A humanoid drawn from the front says nothing about its own depth: off that axis the torso, pelvis and head are boxes and the limbs are tubes set through the body, at the same joint angles the pose already solved.
- Alert is visual state only; the component does not infer threats or start a timer.
- The tracked sensor translates inside a fixed protective bar so it remains mechanically legible.

## Usage

```tsx
import { SecurityDroid } from "@/components/ui/security-droid"

<SecurityDroid behavior="patrol" />
<SecurityDroid pose="guard" alert look={{ x: -0.4, y: 0 }} headAngle={-20} />
```

## 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. |
| `behavior` | `"patrol" | "alert" | "idle" | "static"` | `"patrol"` | The beat it walks when it is not posed. Alert stands it to guard and shortens the scan. |
| `speed` | `number` | `0.35` | Cycles per second: one sweep of the head. |
| `pose` | `"stand" | "patrol" | "guard"` | — | Whole-frame stance and arm position. Omit and behavior picks one. |
| `headAngle` | `number` | — | Head rotation in degrees, clamped to −70..70. Omit to run behavior. |
| `look` | `Vec2 | null` | `null` | Controlled horizontal sensor aim; overrides tracking. |
| `track` | `boolean` | `true` | Follow the page pointer while look is null. |
| `alert` | `boolean` | `false` | Light the alert beacon, promote the sensor colour, and stand it to guard. |
| `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. |
| `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/security-droid.tsx`
