Modus UI

Dot Whirl

Web (React)

A leaning funnel of 9,500 dots wound by two spiral guides, drawn in your theme's ink.

A Three.js funnel of 9,500 orbiting dots, wound by two spiral guides and a haze of ambient dust, leaning across the frame and turning toward the pointer. Dots and guides take the theme's ink and muted tones over the theme background: additive light in dark mode, plain ink on paper in light mode, following the palette picker. It fills its positioned parent, pauses when off screen and renders a still frame when the user prefers reduced motion.

Modus / Dot Whirl

Installation

CLI

npx @modus-ui/cli add dot-whirl

Manual

  1. Install three.
  2. Copy the code from the component tab.
  3. Create a file at components/ui/dot-whirl.tsx.
  4. Paste the code.

Usage

tsx
import { DotWhirl } from "@/components/ui/dot-whirl";

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

Props

PropTypeDefaultDescription
speednumber1Animation speed multiplier (0 to 3).
sizenumber1Point size multiplier.
densitynumber1Particle count multiplier (0.25 to 2.5).
opacitynumber1Opacity of the effect (0.05 to 1).
huenumber0Hue rotation in degrees (-180 to 180).
saturationnumber1Saturation multiplier (0 to 2).
brightnessnumber1Brightness multiplier (0.35 to 1.65).
primaryColorstringtheme inkColour of the whirl dots and the bright spiral guide.
secondaryColorstringtheme muted toneColour of the dim spiral guide and ambient dust.
backgroundColorstringtheme backgroundColour behind the whirl.

Comments

  • No comments yet.