# Maglev carriage

A payload carriage travels above a segmented linear stator while preserving a visible air gap. Deck, bin and compact robot payloads share the same transport.

> 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/maglev-carriage.json
```

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

## Notes

- The air gap and linear geometry are illustrated. The component does not simulate lift force, stability, commutation, mass or acceleration.

## Usage

```tsx
import { MaglevCarriage } from "@/components/ui/maglev-carriage"

<MaglevCarriage behavior="shuttle" payload="bin" view="iso" />
<MaglevCarriage travel={0.4} interactive onTravelChange={setTravel} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `travel` | `number` | — | Controlled carriage position from 0 to 1 along the stator. |
| `behavior` | `"shuttle" | "hover" | "static"` | `"shuttle"` | Full travel or small centre corrections. |
| `payload` | `"deck" | "bin" | "robot"` | `"deck"` | Load mounted on the carriage. |
| `interactive / onTravelChange` | `boolean / (travel: number) => void` | — | Drag or arrow-key along the rail. |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"profile"` | Where the camera stands. One maglev carriage, 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/maglev-carriage.tsx`
