Data Flow Pipes

Glowing data packets travel along SVG bezier pipes between system nodes, leaving fading trails

Installation

$ pnpm dlx shadcn@latest add @remocn/data-flow-pipes

Usage

// src/Root.tsx
import { Composition } from "remotion";
import { DataFlowPipes } from "@/components/remocn/data-flow-pipes";

const DataFlowPipesScene = () => (
  <DataFlowPipes
    nodes={[
      { id: "client", x: 140, y: 360, label: "Client" },
      { id: "api", x: 460, y: 200, label: "API" },
      { id: "db", x: 820, y: 360, label: "Database" },
    ]}
    edges={[
      { from: "client", to: "api", startFrame: 0 },
      { from: "api", to: "db", startFrame: 18 },
    ]}
  />
);

export const RemotionRoot = () => (
  <Composition
    id="DataFlowPipes"
    component={DataFlowPipesScene}
    durationInFrames={180}
    fps={30}
    width={1280}
    height={720}
  />
);

Props

PropTypeDefaultDescription
nodes
DataFlowNode[]Array of `{ id, x, y, label }`. Coordinates are in the 1280×720 viewBox.
edges
DataFlowEdge[]Array of `{ from, to, startFrame }`. Each edge becomes a static pipe plus an animated pulse.
pipeColor
string"#1f1f23"Color of the static pipe stroke
pulseColor
string"#22d3ee"Color of the moving pulse and its glow
pulseLength
number60Length of the bright dash in pixels
pulseDuration
number36Frames a single pulse takes to traverse its edge
background
string"#050505"Page background color
nodeColor
string"#0a0a0a"Node card background color
textColor
string"#fafafa"Node label color
speed
number1Playback speed multiplier
className
stringOptional className passed to the root container