Modus UI

Circuit Background

Web (React)

A highly ambient, canvas-based circuit board animation with interactive mouse ripple effects.

A premium HTML5 Canvas-based background animation. Technical circuit lines grow, branch off, and fade, while pointer hover and clicks trigger smooth, natural water ripples that respond to current theme modes.

Layout Element

Circuit Background

Move your mouse across this area or click to emit soft ripple waves. Watch ambient technical trails grow, turn at angles, and fade away in the background.

Installation

CLI

npx @modus-ui/cli add circuit-background

Manual

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

Usage

tsx
import { CircuitBackground } from "@/components/ui/circuit-background";

export default function Layout({ children }: { children: React.ReactNode }) {
  return (
    <div className="relative min-h-screen">
      <CircuitBackground />
      <main className="relative z-10">{children}</main>
    </div>
  );
}

Props

PropTypeDefaultDescription
maxTrailsnumber60The maximum amount of concurrently active growing circuits.
lineColorstring-Custom stroke color for circuit lines. (Defaults to theme-adapted colors).
circleColorstring-Custom border color for connection node circles. (Defaults to theme-adapted colors).
glowStrengthnumber6Glow shadow size in pixels.
circleSizenumber5Radius of the circuit connection nodes.
spawnChancenumber0.03Probability of spawning a new circuit line per frame.
classNamestring-Additional CSS class for the canvas containers.

Comments

  • No comments yet.