Modus UI

Sigil Weather

Web (React)

A WebGL2 background where lightning, water or flame plays around a sigil, toned in the active theme colours.

A full-bleed WebGL2 scene built around a signed distance field of a sigil. Lightning crawls fBm arcs along its contour by default; water refracts it beneath pointer-driven ripples, and flame licks noise-driven tongues and embers upward from its edge. The whole scene is mapped through a duotone of the theme tokens (background, primary, foreground), so it reads as ink on paper in light mode, glows in dark mode and follows the palette; set palette="original" to keep the source colours. It fills its positioned parent, pauses when off screen or when the tab is hidden, and renders a still frame when the user prefers reduced motion.

Modus / Sigil Weather

Installation

CLI

npx @modus-ui/cli add sigil-weather

Manual

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

Usage

tsx
import { SigilWeather } from "@/components/ui/sigil-weather";

export default function Example() {
  return (
    <div className="relative h-[500px] w-full overflow-hidden">
      <SigilWeather variant="lightning" />
    </div>
  );
}

Props

PropTypeDefaultDescription
variant"water" | "lightning" | "flame""lightning"Which element plays around the sigil.
palette"theme" | "original""theme"theme tones the scene with the theme tokens; original keeps the source colours.
markPathstring"M12 0C12.9 7 17 11.1 24 12C17 12.9 12.9 17 12 24C11.1 17 7 12.9 0 12C7 11.1 11.1 7 12 0Z"SVG path data in a 24×24 viewBox used as the central mark.
speednumber1Animation speed multiplier (0 to 3).
sizenumber1Mark size multiplier (0.65 to 1.5).
particleAmountnumber1Particle count multiplier (0 to 2).
opacitynumber1Canvas opacity (0.05 to 1).
huenumber0Hue rotation in degrees (-180 to 180).
saturationnumber1Saturation multiplier (0 to 2).
brightnessnumber1Brightness multiplier (0.35 to 1.8).
backgroundColorstring--backgroundDarkest tone of the scene (theme token by default).

Comments

  • No comments yet.