# Avocado

A split-shell specimen pod: one body of revolution cut in half, tilting apart on a rod under the machine, with the stone riding up out of the gap on a screw column.

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

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

## Notes

- The cut is the mechanism. The two halves are the same surface of revolution, so shutting them reassembles it exactly; the interior is the section polygon of the shell's inner surface, drawn only while it faces the camera, and the wall between the two is what makes an open half read as a bowl.
- The stone and its column are painted behind both halves, so what you see of them is only what the gap actually exposes — shut, the reassembled shell covers them completely.
- One geometry, four cameras. Solved: the profile, the split, the hinge, the projection and the hidden-surface pass on the cut faces, the optic and the speckle. Illustrated: the polish highlight on the stone and the speckle pattern itself, which sits on the surface but means nothing.
- An original field-unit archetype. There is no crop, ripeness or handling model: the shell opens because `open` said so.

## Usage

```tsx
import { RobotAvocado } from "@/components/ui/robot-avocado"

<RobotAvocado open={0.7} bearing={24} interactive />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"front"` | Where the camera stands. One pod, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `open` | `number` | — | Controlled shell opening, 0 shut to 1 wide. Omit and the shell runs itself. |
| `behavior` | `"present" | "ajar" | "scan" | "static"` | `"present"` | Present opens, holds the stone up and shuts; ajar never opens more than a crack; scan holds it half open while the optic works the room. |
| `speed` | `number` | `0.24` | Open-and-shut 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` | `false` | Drag either way out of the middle to part the shell, or focus it and use the arrows: 10 per cent a press, 25 with shift, Home and End shut and wide. Release eases back into the behaviour. |
| `onOpenChange` | `(open: number) => void` | — | Fires on every drag and key press, in controlled mode too. |
| `bearing` | `number` | — | Where the stone's optic is aimed, in degrees off the face, clamped to ±180. Omit and the behaviour aims it. |
| `stone` | `"optic" | "core" | "none"` | `"optic"` | What sits in the socket: a lens on the polished core, the bare core, or an empty socket. |
| `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/robot-avocado.tsx`
