Skip to content
LSD Framework
LSD primitive · behaviours · visual JS

Behaviors Wire Graph

Trigger on the left. Action in the middle. Target on the right. Pick from the dropdowns and a packet travels the wire when you run it. This is visual JS without the lock-in — the graph compiles to a Behaviour spec that the runtime executes directly.

trigger · action · target SVG bezier · packet animation ↩ All components
01 · Trigger → Action → Target3-node wire
Triggerfires when

When

Actiondoes

Then

Targeton

On

cta
spec · cta-pulse-01
02 · Two triggers fan into one actionmulti-wire
Trigger Afires when

On click

Trigger Bfires when

On scroll

Actionboth routes

Reveal aurora

03 · Compile-to-JSON readoutBehaviour spec
{
  "id": "cta-pulse-01",
  "when": "click",
  "do": "scale",
  "on": "#cta",
  "duration": 320,
  "easing": "cubic-bezier(0.22, 1, 0.36, 1)"
}
UsageAPI surface

Authoring contract

Each .lsd-bwg__node declares its data-role and exposes ports. The host computes bezier paths between port positions, animates a packet along the wire on run, then applies the action to the chosen target via data-fx. The dropdown selections compile to a JSON Behaviour spec.

HookValuesEffect
data-roletrigger · action · targetNode type. Drives port placement + color.
data-portidentHook for wire endpoints.
data-fx on hostscale · fade · toggleWhich CSS transition the target plays on run.
data-runningbooleanTrue during packet travel.
JS eventbwg:runFires with detail.spec (JSON).
prefers-reduced-motionPacket snap to target; action still runs.
View HTML
<div class="lsd-bwg" data-fx="scale">
  <svg class="lsd-bwg__svg"><path class="lsd-bwg__wire" d="…"/></svg>
  <div class="lsd-bwg__node" data-role="trigger">…</div>
  <div class="lsd-bwg__node" data-role="action">…</div>
  <div class="lsd-bwg__node" data-role="target">…</div>
</div>
LSD components · Behaviors Wire Graph · primitive
↩ All components