Skip to Content
zjkm-ui
Components

Network Lines

Lines that connect points into a network.

ProPro, coming soon.

Your agents, in sync

Props
60
120px
18px/s
<NetworkLines>
  <Hero />
</NetworkLines>

Get notified

Network Lines is a Pro effect. Join the waitlist and we'll email you when it's available.

Usage

Points drift slowly across the background, and lines join the ones that come close, fading with distance. It draws on a canvas, and the drawing stops while it's off-screen or the tab is hidden. Without canvas support, your content shows on its own.

import { NetworkLines } from "@zjkm/pro/network-lines";

export function Hero() {
  return (
    <NetworkLines className="rounded-2xl p-16">
      <h1>Your agents, in sync</h1>
    </NetworkLines>
  );
}

Every point is checked against every other each frame, so keep count in the low hundreds.

Props

PropTypeDefaultDescription
childrenReactNodeContent shown over the network.
colorstring"#94a3b8"Colour of points and lines.
countnumber60Number of points.
linkDistancenumber120Points closer than this many pixels are joined.
speednumber18Drift speed in pixels per second.
classNamestringClasses for the wrapper.

With reduced motion, the network stays still.

On this page