# Slate tablet

A slate and the kickstand under it. One recline axis leans the slate and solves the stand's foot onto the desk; a leg too short to reach folds instead of stretching.

> 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/slate-tablet.json
```

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

## Notes

- One axis moves two things. `recline` sets the tilt, and the stand is then a triangle that has to close: the slate's bottom edge is on the desk, the foot has to be on the desk too, and the leg is at its real length — so the horizontal run is whatever is left of it after the drop.
- The fault is reported rather than hidden. Shorten `leg` past what the tilt needs and `standPose` returns `folded`: the stand lies flat against the back and the readout and the accessible label both say so, the same way `motion-platform` reports a leg out of travel.
- No contact model, no friction and no mass — nothing here says the slate would actually stay up. The stylus is docked rather than held on, and the screen artwork is illustrated.
- An original archetype. No manufacturer, product line, wordmark or paint scheme is reproduced here or in the demo.

## Usage

```tsx
import { SlateTablet } from "@/components/ui/slate-tablet"

<SlateTablet screen="sketch" stylus />

// Controlled, or a slate you can push back.
<SlateTablet recline={0.8} />
<SlateTablet interactive onReclineChange={setRecline} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"profile"` | Where the camera stands. One slate, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `recline` | `number` | — | Controlled recline, 0 nearly upright to 1 laid right back. Omit it and the slate runs behavior. |
| `behavior` | `"prop" | "sketch" | "static"` | `"prop"` | Stand it up, hold it and lay it back down, or work the small range someone drawing on it uses. |
| `leg` | `number` | `46` | Stand leg length in world units, clamped 20–80. Too short for the tilt and the stand folds. |
| `speed` | `number` | `0.22` | Recline 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 the slate back, or arrow-key it five percent at a time. |
| `onReclineChange` | `(recline: number) => void` | — | Recline, 0–1, throughout a drag or a key press. |
| `screen` | `"home" | "sketch" | "off"` | `"home"` | What the display is showing. Structure in palette roles, never an application's own artwork. |
| `stylus` | `boolean` | `true` | Dock the stylus along the top edge. |
| `showDesk` | `boolean` | `true` | Draw the contact shadow on the desk. |
| `label` | `string` | — | Caption below the state readout. |
| `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/slate-tablet.tsx`
