Modus UI

Node Weave

Web (React)

A canvas weave of hollow knots and solid ink hubs, threaded by hairlines that tighten around the pointer.

Hollow knots drift across a 2D canvas on the page's own background, threaded together by hairlines whenever they come close; every sixth knot is a solid hub in the primary colour with a breathing ring, and its threads take on that colour. Colours come from the active theme, so the weave is ink on paper in light mode and follows the palette in dark mode. It fills its positioned parent, pauses when off screen and renders a still frame when the user prefers reduced motion.

Modus / Node Weave

Installation

CLI

npx @modus-ui/cli add node-weave

Manual

  1. Copy the code from the component tab.
  2. Create a file at components/ui/node-weave.tsx.
  3. Paste the code.

Usage

tsx
import { NodeWeave } from "@/components/ui/node-weave";

export default function Example() {
  return (
    <div className="relative h-[500px] w-full overflow-hidden">
      <NodeWeave />
      <div className="relative z-10 p-8">
        <h1>Content over the background</h1>
      </div>
    </div>
  );
}

Props

PropTypeDefaultDescription
speednumber1Drift and pulse speed multiplier (0 to 3).
sizenumber1Knot radius multiplier.
lengthnumber1Link distance multiplier (base 160px, 0.35 to 2.5).
densitynumber1Node count multiplier (85 nodes on wide hosts, 40 under 768px).
strokeWidthnumber0.75Link line width in pixels.
opacitynumber1Opacity of nodes and links (0.05 to 1).
huenumber0Hue rotation in degrees (-180 to 180).
saturationnumber1Saturation multiplier (0 to 2).
brightnessnumber1Brightness multiplier (0.35 to 1.65).
colorstring--primaryHub and hub-thread colour (theme token by default).
backgroundColorstring--backgroundScene background (theme token by default).

Comments

  • No comments yet.