# Storage tank

A tank whose roof has no fixed height. The floating roof rides the liquid and the rolling ladder, hinged at the shell top with its wheels on the deck, is solved from wherever the roof is.

> 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/storage-tank.json
```

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

## Notes

- The shell is a body of revolution, so the silhouette, the course seams, the wind girder and the spiral stair are one geometry projected from every camera.
- A low roof is genuinely hidden behind the near wall from ground level, which is why the gauge board is there. No volume, mass, vapour, temperature or capacity is computed.

## Usage

```tsx
import { StorageTank } from "@/components/ui/storage-tank"

<StorageTank behavior="fill" courses={5} />
<StorageTank level={0.3} roof="fixed" interactive onLevelChange={setLevel} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `level` | `number` | — | Controlled liquid level, 0 empty to 1 full. Supplying it stops the loop. |
| `behavior` | `"fill" | "draw" | "static"` | `"fill"` | A tank running up and back down, or a slow draw-off and a fast refill. |
| `roof` | `"floating" | "fixed"` | `"floating"` | A roof that rides the liquid, or a cone roof that does not — in which case the level only shows on the gauge. |
| `courses` | `number` | `4` | Shell courses, drawn as weld seams round the tank. Clamped to 2–8. |
| `showStair` | `boolean` | `true` | The spiral stairway up the outside of the shell. |
| `interactive / onLevelChange` | `boolean / (level: number) => void` | — | Drag or arrow-key the tank up and down. |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"front"` | Where the camera stands. One tank, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `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. |
| `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/storage-tank.tsx`
