Uni-Directional Flow

Beams flow in a single direction from source to target, ideal for representing one-way data flows or sequential processes.

SourceTarget
<AnimatedBeam
  nodes={[
    { id: 'source', x: 100, y: 200, label: 'Source' },
    { id: 'target', x: 500, y: 200, label: 'Target' }
  ]}
  connections={[{ from: 'source', to: 'target' }]}
/>

Bi-Directional Flow

Beams travel in both directions simultaneously, perfect for representing two-way communication or synchronisation processes.

AB
<AnimatedBeam
  nodes={[
    { id: 'a', x: 100, y: 200, label: 'A' },
    { id: 'b', x: 500, y: 200, label: 'B' }
  ]}
  connections={[{ from: 'a', to: 'b', bidirectional: true }]}
/>

Multiple Inputs

Multiple beams from various sources converge to a single target, great for visualising data aggregation or fan-in patterns.

Input 1Input 2Input 3Output
<AnimatedBeam
  nodes={[
    { id: 'input1', x: 100, y: 100, label: 'Input 1' },
    { id: 'input2', x: 100, y: 200, label: 'Input 2' },
    { id: 'input3', x: 100, y: 300, label: 'Input 3' },
    { id: 'output', x: 500, y: 200, label: 'Output' }
  ]}
  connections={[
    { from: 'input1', to: 'output' },
    { from: 'input2', to: 'output' },
    { from: 'input3', to: 'output' }
  ]}
/>

Customization Options

Customise colours, speeds, sizes, and effects to match your design system.

Fast (1s)

SourceTarget

Slow (4s)

SourceTarget

Green Theme

SourceTarget

Purple Theme

SourceTarget

With Gradient

SourceTarget

Thick Beams

SourceTarget

Component Features

Fully Customisable

Configure colours, speeds, sizes, and animation patterns via props. Match any design system.

Pure CSS Animation

Smooth 60fps animations using CSS keyframes. No JavaScript runtime overhead, hardware-accelerated.

SVG-Based

Crisp rendering at any scale using SVG graphics. Perfect for responsive designs and high-DPI displays.

Zero Dependencies

No external libraries required. Fully self-contained component you can copy-paste anywhere.

Accessible

Respects prefers-reduced-motion for users with motion sensitivity. ARIA labels for screen readers.

TypeScript Ready

Fully typed props with comprehensive interfaces. Autocomplete and type checking built-in.

Props Reference

PropTypeDefaultDescription
widthnumber600Container width in pixels
heightnumber400Container height in pixels
nodesBeamNode[][]Array of node objects with id, x, y, label
connectionsBeamConnection[][]Array defining which nodes connect
beamColorstring'#3b82f6'Colour of the animated beams (hex format)
beamWidthnumber2Width of beam lines in pixels
beamSpeednumber2Animation duration in seconds
bidirectionalbooleanfalseEnable bi-directional flow animation
gradientbooleanfalseUse gradient instead of dashed line
nodeSizenumber12Radius of node circles in pixels
nodeColorstring'#3b82f6'Fill colour for node circles (hex format)

Use Cases

System Architecture

Visualise microservices, APIs, and system components with data flow animations.

Data Pipelines

Show ETL processes, data transformations, and pipeline stages with directional flows.

Network Topology

Display network connections, nodes, and traffic patterns in real-time visualisations.

Process Flows

Illustrate business processes, workflows, and decision trees with animated connections.