Components
Network Lines
Lines that connect points into a network.
ProPro, coming soon.
Your agents, in sync
<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
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Content shown over the network. | |
color | string | "#94a3b8" | Colour of points and lines. |
count | number | 60 | Number of points. |
linkDistance | number | 120 | Points closer than this many pixels are joined. |
speed | number | 18 | Drift speed in pixels per second. |
className | string | Classes for the wrapper. |
With reduced motion, the network stays still.