# Face

A head whose eyes follow the pointer anywhere on the page, with moods for the states a product actually has.

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

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

## Usage

```tsx
<RobotFace mood="curious" size="lg" label="RC-01" />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `mood` | `"idle" | "happy" | "curious" | "focused" | "error" | "sleeping"` | `"idle"` | Eyes and mouth together. |
| `track` | `boolean` | `true` | Follow the pointer anywhere on the page. |
| `look` | `Vec2 | null` | — | Look here instead, in -1..1 on both axes. |
| `blink` | `boolean` | `true` | Occasional blink. |
| `behavior` | `"wander" | "scan" | "still"` | `"wander"` | What the eyes do with no pointer and no look: drift about, sweep side to side, or hold still. The head breathes either way. |
| `speed` | `number` | `0.18` | Wander cycles per second. |
| `interactive` | `boolean` | `true` | Flinch when poked: the head recoils and the eyes drop, decaying out over about a second. |
| `onPoke` | `() => void` | — | Fired on the press that starts a flinch. |
| `showAntenna` | `boolean` | `true` | The antenna and its status lamp. |
| `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-face.tsx`
