Modus UI

Plasma Glow

Web (React)

Glowing plasma with bloom, chromatic aberration and a vignette.

An animated plasma field with a bloom pass, a touch of chromatic aberration and a dark vignette. It fills its positioned parent and freezes its animation when the user prefers reduced motion. Built on the shaders library (MIT) and rendered with WebGPU.

Plasma Glow

Installation

CLI

npx @modus-ui/cli add plasma-glow

Manual

  1. Install shaders with npm install shaders.
  2. Copy the code from the component tab.
  3. Create a file at components/ui/plasma-glow.tsx.
  4. Paste the code.

Usage

tsx
import { PlasmaGlow } from "@/components/ui/plasma-glow";

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

Props

PropTypeDefaultDescription
colorAstring"#0b0221"Dark plasma colour.
colorBstring"#ff3fa4"Bright plasma colour.
speednumber1Animation speed.
densitynumber1Density of the plasma bands.
warpnumber1Amount of domain warping.
glownumber0.6Bloom intensity.
aberrationnumber0.3Chromatic aberration strength.

Comments

  • No comments yet.