Patchbay Integrations
An integrations showcase built on the studio patchbay metaphor — drag a cable from an output jack on the left into an integration jack on the right, with physically sagging curves and indicator lights that come on.
This is a WebberUI Pro component
Free during the launch campaign: sign up or sign in, then hit “Copy install command” in the preview above and it installs straight away — no payment, no credit card. The command below returns 401 while you are signed out.
npx shadcn@latest add "https://webberui.com/r/patchbay-integrations.json?t=<install token>"Playground
Tune the props live — the code snippet updates as you go, so you can dial in the look you want before copying it.
<PatchbayIntegrations />
Installation
npx shadcn@latest add "https://webberui.com/r/patchbay-integrations.json?t=<install token>"Or, once registries are configured in components.json, install it as @webberui/patchbay-integrations.
Usage
import * as React from "react";
import {
PatchbayIntegrations,
type PatchbayConnection,
} from "@/components/ui/patchbay-integrations";
const outputs = [
{ id: "events", label: "Event stream" },
{ id: "webhook", label: "Webhook" },
];
const integrations = [
{ id: "slack", label: "Slack", accent: "#4a154b" },
{ id: "github", label: "GitHub" },
{ id: "email", label: "Email" },
];
export function Example() {
const [connections, setConnections] = React.useState<PatchbayConnection[]>([
{ from: "events", to: "slack" },
]);
return (
<PatchbayIntegrations
outputs={outputs}
integrations={integrations}
connections={connections}
onConnectionsChange={setConnections}
/>
);
}For uncontrolled usage, just pass defaultConnections instead and the component manages the connection state itself:
<PatchbayIntegrations
outputs={outputs}
integrations={integrations}
defaultConnections={[{ from: "events", to: "slack" }]}
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
outputs | PatchbayOutput[] | — | List of output jacks on the left (id / label / optional icon) |
integrations | PatchbayIntegration[] | — | List of integration jacks on the right (id / label / optional icon / accent) |
connections | PatchbayConnection[] | — | Controlled connection array; when passed, the outside source wins |
defaultConnections | PatchbayConnection[] | [] | Uncontrolled initial connection array |
onConnectionsChange | (next: PatchbayConnection[]) => void | — | Fires when connections are added or removed (both dragging and click-to-patch call it) |
interactive | boolean | true | Whether drag / click patching is allowed; false makes it display only |
cableSag | number | 1 | Multiplier for how far the cable sags — larger is slacker |
label | string | "Integration patchbay" | aria-label for the root container |
className | string | — | Additional styles |
Types
interface PatchbayOutput {
id: string;
label: string;
icon?: React.ReactNode;
}
interface PatchbayIntegration {
id: string;
label: string;
icon?: React.ReactNode;
accent?: string; // Brand accent color (HEX/RGB), applied to the cable and indicator light
}
interface PatchbayConnection {
from: string; // output jack id
to: string; // integration jack id
}How it works
- Cables are drawn as cubic béziers with control points pulled downward, imitating a patch cable slackened by gravity;
cableSagadjusts how slack it looks. - Endpoint anchors are measured live from the center of each jack circle (
ResizeObserver+window resize), so the cables re-land correctly whenever the container resizes or reflows. - One output jack can feed several integrations at once, and one integration can accept several output jacks; dragging or clicking the same pair again unpatches it.
- Once patched, the matching integration's indicator light comes on; hovering, selecting, or dragging an output jack makes the indicator lights of its connected jacks pulse for emphasis.
- When
accentis not provided, the cable and indicator light use a neutral color; when it is, that brand color is applied.
Accessibility
- Output jacks and integration jacks are both native
buttons and can be operated with the keyboard: first select an output jack with Enter / Space (aria-pressed), then press an integration jack to create or remove the connection. - While an output jack is selected, each integration jack's
aria-pressedreflects whether it is already connected to it, and thearia-labelsays "press to connect / press to disconnect". - Dragging uses pointer events with a hit radius, and on touch
touch-nonekeeps page scrolling from interfering. - The SVG cable layer is
aria-hiddenandpointer-events-none, so it does not interfere with clicking or announcing the buttons underneath. - When the user has "reduce motion" enabled at the system level, the cable draw-in and the indicator pulse are disabled, and connections and lit states are shown directly.
Case Study Dossier
A dossier-style case study layout — a sticky metrics rail on the left lights up and counts as the long-form copy scrolls by, while full-bleed pull quotes periodically break the two-column rhythm to let it breathe.
Queue Waitlist Section
A gamified waitlist section — submit an email and a 3D card flip reveals your queue number and the crowd ahead of you; copy the referral link and you move up the line with a queue-jump animation.