Modus UI

Confluence Lines

Web (React)

A WebGL shader of three light streams meeting on the page background, inked in the theme primary, foreground and muted tones.

A WebGL shader of three light streams meeting on the page background, inked in the theme primary, foreground and muted tones. It fills its positioned parent, follows the active theme and palette in light and dark mode, pauses when off screen and renders a still frame when the user prefers reduced motion.

Modus / Confluence Lines

Installation

CLI

npx @modus-ui/cli add confluence-lines

Manual

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

Usage

tsx
import { ConfluenceLines } from "@/components/ui/confluence-lines";

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

Props

PropTypeDefaultDescription
speednumber1Animation speed multiplier.
fidelitynumber0.5Spread between the three streams.
scalenumber1Scale of the rendered canvas.
brightnessnumber1CSS brightness filter.
opacitynumber1Canvas opacity.
huenumber0Hue rotation in degrees.
saturationnumber1CSS saturation filter.
backgroundColorstringtheme backgroundBackground behind the canvas.
colorsstring[]theme primary, foreground and muted foregroundOne colour per stream.

Comments

  • No comments yet.