# Induction motor

A cutaway three-phase stator around a squirrel-cage rotor. The ideal field vector and mechanical rotor angle separate by a configurable illustrative slip.

> 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/induction-motor.json
```

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

## Notes

- The three-phase vector sum is ideal and exact. Slip animation is explanatory timing, not a torque, load, current or thermal model.

## Usage

```tsx
import { InductionMotor } from "@/components/ui/induction-motor"

<InductionMotor behavior="slip" poles={4} view="iso" />
<InductionMotor angle={120} interactive onAngleChange={setAngle} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `angle` | `number` | — | Controlled mechanical rotor angle in degrees. |
| `behavior` | `"run" | "slip" | "static"` | `"run"` | Continuous or visibly lagging automatic rotation. |
| `poles` | `2 | 4 | 6` | `4` | Stator pole count used by the ideal three-phase resultant. |
| `slip` | `number` | `0.06` | Illustrative 0–0.3 separation between field and rotor timing. |
| `interactive / onAngleChange` | `boolean / (angle: number) => void` | — | Wind the rotor and report its angle. |
| `showField` | `boolean` | `true` | Show the calculated three-phase resultant marker. |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"front"` | Where the camera stands. One induction motor, 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/induction-motor.tsx`
