Modus UI

Aperture Bloom

Web (React)

A centred, noise-warped pair of WebGL rings inked in the theme colours that leans toward the pointer.

A full-bleed Three.js shader draws a tight aperture of two noise-warped rings at the centre of the frame. In light mode they are inked on --background in --primary with a --muted-foreground fringe; in dark mode they glow additively, a --foreground core over a --primary fringe. It follows palette and mode changes live, and drifts slightly toward the pointer. It fills its positioned parent, pauses when off screen and renders a still frame when the user prefers reduced motion.

Modus / Aperture Bloom

Installation

CLI

npx @modus-ui/cli add aperture-bloom

Manual

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

Usage

tsx
import { ApertureBloom } from "@/components/ui/aperture-bloom";

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

Props

PropTypeDefaultDescription
speednumber1Animation speed multiplier (0 to 3).
sizenumber1Ring thickness multiplier.
lengthnumber1Ring radius multiplier (0.35 to 2.5).
opacitynumber1Opacity of the glow (0.05 to 1).
huenumber0Hue rotation in degrees (-180 to 180).
saturationnumber1Saturation multiplier (0 to 2).
brightnessnumber1Brightness multiplier (0.35 to 1.65).
coreColorstringtheme tokensColour of the ring's bright core.
fringeColorstringtheme tokensColour of the soft fringe and ambient wash.
backgroundColorstringtheme --backgroundScene background behind the glow.

Comments

  • No comments yet.