Route the studio
Monitor patch · local routing state
Choose a crosspoint to connect or disconnect. Different signal types remain blocked.
Connects supplied source and destination ports through a keyboard-navigable matrix, with signal types, channel groups, and blocked-route reasons.
Monitor patch · local routing state
Choose a crosspoint to connect or disconnect. Different signal types remain blocked.
Three ways in. They share one source, so the pixels match whichever you pick.
npm install @noorddev/vlak-react
// once, next to your app's root
import "@noorddev/vlak-react/css";
import { Patchbay } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/patchbay.
npx @noorddev/vlak-cli add patchbay
The StyleX leaf lands in components/vlak/, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/patchbay.json
The same registry item, installed by shadcn's CLI.
<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />
No React. Link vlak.css and use the markup and classes below.
import { Patchbay } from "@noorddev/vlak-react";
<Patchbay label="Studio routing" name="routes"
sources={[{ id: "mix-l", label: "Mix left", group: "Mix bus", signalType: "audio" }]}
destinations={[{ id: "out-l", label: "Monitor left", group: "Outputs", signalType: "audio" }, { id: "clock", label: "Clock", signalType: "control" }]}
defaultValue={[{ sourceId: "mix-l", destinationId: "out-l" }]} />A connection matrix for supplied ports; the caller owns the routing engine.
| Prop | Type | Default | Description |
|---|---|---|---|
labelrequired | ReactNode | ||
sourcesrequired | PatchPort[] | ||
destinationsrequired | PatchPort[] | ||
value | PatchConnection[] | ||
defaultValue | PatchConnection[] | [] | |
onValueChange | (connections: PatchConnection[]) => void | ||
getBlockReason | (source: PatchPort, destination: PatchPort) => string | null | Additional host constraints. Matching signal types are required by default. | |
readOnly | boolean |
Also accepts Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, "defaultValue" | "onChange">.
| Keys | Does |
|---|---|
| Tab | Enters the connection matrix at one enabled checkbox, then leaves the matrix. |
| Arrow keys | Moves focus through enabled crosspoints in the same row or column. |
| Home, End | Moves to the first or last enabled crosspoint in the row; Control includes the whole matrix. |
| Space | Toggles the focused connection through the native checkbox. |
<fieldset class="rs-patchbay"><legend class="rs-patchbay-legend">Studio routing</legend><div class="rs-patchbay-viewport"><table class="rs-patchbay-table"><thead><tr><th class="rs-patchbay-header" scope="col">Source / destination</th><th class="rs-patchbay-header" scope="col">Monitor left<span class="rs-patchbay-detail">Outputs · audio</span></th></tr></thead><tbody><tr><th class="rs-patchbay-header" scope="row">Mix left<span class="rs-patchbay-detail">Mix bus · audio</span></th><td class="rs-patchbay-cell"><label class="rs-patchbay-control rs-patchbay-connected"><span aria-hidden="true">✓</span><input class="rs-patchbay-input" type="checkbox" checked aria-label="Mix left to Monitor left" /></label></td></tr></tbody></table></div></fieldset>