Power-User Systems

Patchbay

A modular-synth patch bay. The jacks are real DOM buttons, focusable, labelled and keyboard-patchable, and only the cables live on a canvas underneath the pointer's reach, because a cable is pure paint: a quadratic Bézier whose control point hangs below the midpoint by a sprung sag. Drag from any jack and a live cable follows the hand. Release near a jack on the opposite bank and it seats with an overshoot-and-settle wobble, elsewhere it retracts. Seated cables carry signal pulses on a bounded phase, grabbing an occupied input picks its cable up to repatch, and resizing the bay shakes every cable, which is follow-through, cheaply.

Install

# Patchbay needs no npm packages

Then copy 2 files into your project:

  • components/registry/patchbay/patchbay.tsx
  • hooks/use-animation-loop.ts

Props

PropTypeDefaultDescription
droopnumber46Cable slack at rest — how far the middle hangs.
wobblenumber0.6Spring in the sag when a cable seats or the bay resizes.
pulseSpeednumber1Signal travel rate along a connected cable.
pulseCountnumber3Pulses in flight per cable; 0 runs the bay dark.
cableWidthnumber2.5Cable gauge.
showLabelsbooleantrueModule names under the jacks.
cableColorstring (hex)"#a78bfa"The patch cables.
pulseColorstring (hex)"#e9e6ff"The signal riding them.

What It Demonstrates

Drag
Moving an element by grabbing it, often with momentum when released.
Spring
Motion driven by physics (tension, mass, damping) rather than a set duration.
Follow-through
Parts of an element keep moving and settle slightly after the main motion stops, adding weight.
Loop
An animation that repeats, a set number of times or infinitely.

Related Components

Appears In