Flow diagram
ProA labelled node-and-edge diagram where packets travel along active connections.
pnpm dlx shadcn@latest add @caliper/flow-diagram- Web to API, active
- API to Payments: charge, active
- API to Backup
When to use #
Use it for
- Explaining how a request or payment moves between services.
- Showing which part of a system is healthy, degraded or down.
Skip it when
- The graph is large or user-editable; use a dedicated graph editor.
- A static picture would do; the motion should earn its place.
Installation #
pnpm dlx shadcn@latest add @caliper/flow-diagram
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage #
Import it from your copy of the source. The example behind the preview comes with the source.
import { FlowDiagram } from "@/components/ui/flow-diagram"
The worked example comes with Pro
The 25-line example behind the preview opens here with a Pro or Team licence.
API reference #
FlowDiagram
component
Accessibility #
It exposes region semantics, with aria-label, aria-hidden and aria-pressed kept in step with state.
Motion #
Transitions use the shared duration and easing tokens. Under prefers-reduced-motion those tokens collapse to instant and travel distances go to zero, so state changes still happen without movement.