Skip to content
caliper ui pro docs

Patch cable

Connect outputs to inputs with cables, like a patch bay: drag from an output's port to an input's port and a cable follows, sagging and swinging with simple rope physics until it settles.

Pro
  • customer_email
  • plan_name
  • mrr_cents
  • created_at
  • Contact email
  • Tier
  • Monthly revenue
  • Customer since

When to use

  • Field mapping for imports and integrations.
  • Routing: which channel goes where, which trigger feeds which action.

When not to use

  • Large graphs; use `FlowDiagram`.
  • Many-to-many mappings where a table of rules is clearer.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/patch-cable

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.

API reference

PatchCable

6 props

Also accepts the native props of its root element and a ref.

PropTypeDefaultDescription
label *string—Names the board, e.g. "Field mapping".
sources *PatchPort[]—
targets *PatchPort[]—
valuePatchLink[]—
defaultValuePatchLink[][]
onValueChange((links: PatchLink[]) => void)—

Keyboard

Enter
Activates the focused control.
Space
Activates the focused control.
Escape
Closes or cancels, then returns focus to where it came from.
Delete
Removes the next character or the selected item.
Backspace
Removes the previous character or item.

Accessibility

It exposes group semantics, with aria-label, aria-hidden and aria-live kept in step with state. Changes that matter are announced through a live region.

Motion

  • State changes animate with the library's shared durations and curves, so its timing matches every other part.
  • Under reduced motion each change lands on its end state without movement; nothing is hidden or skipped.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/patch-cable.md

The index of every part is at /llms.txt.

More in Surfaces