InspectorIllustration
One call traced left to right: request, server, raw result, compacted, agent. The packet swells at the raw result and shrinks when compacted.
Examples
Animated
5 s loop: the packet rides the timeline, each stop lights as it passes.
Light
Dark
<InspectorIllustration tool="get_forecast" server="my-server@local" raw={1840} compacted={912} ms={41} />Static frame
What prefers-reduced-motion visitors see, forced here with `still`.
Light
Dark
<InspectorIllustration tool="get_forecast" server="my-server@local" raw={1840} compacted={912} ms={41} still />Usage
import { InspectorIllustration } from '@switchboard/ui'
<InspectorIllustration tool?="…" server?="…" raw?={n} compacted?={n} ms?={n} />Props
Every component also takes mix, for css() and mixins applied after its own style.
InspectorIllustration
| Prop | Type | Default | Description |
|---|---|---|---|
| tool | string | "get_forecast" | Tool called. |
| server | string | "my-server@local" | Upstream and target, as sb calls shows it. |
| raw | number | 1840 | Tokens in the raw result. |
| compacted | number | 912 | Tokens after compaction; sets the packet’s final width. |
| ms | number | 41 | Call duration, on the ruler and the last stop. |
| label | string | a sentence describing the idea | Accessible name (aria-label and <title>). |
| still | boolean | false | Show the static frame without motion, as under prefers-reduced-motion. |
Also accepts every <svg> attribute. Scales to its container (320–640px wide).
Accessibility
- One role="img" <svg> named by aria-label (and a matching <title>); every drawn part is aria-hidden.
- prefers-reduced-motion: reduce turns the animation off and leaves a static frame that still tells the story.
- Monochrome ink on surface (both flip with the theme); the accent appears only on a lit lamp, never as the only carrier of meaning.
- CSS animations only, loops of 6 s or less, no JavaScript and no timers.
Guidance
Do
- Use numbers from a real sb calls line.
Don’t
- Do not put text the reader needs only inside the drawing; say it in the page copy too.
- Do not crowd more than one moving illustration into a single viewport.