Plasma Wave

A WebGL-powered high-performance interactive dual-band plasma wave animated background.

The Plasma Wave component creates horizontally-mirrored interactive WebGL-powered dual-band plasma wave flows with custom parallax sways and lens chromatic aberrations.

Preview

Usage

Installation

$ pnpm dlx shadcn add https://klarden.vercel.app/r/plasma-wave.json

Basic Example

import { PlasmaWave } from "@/registry/klarden-ui/plasma-wave";

export default function App() {
  return (
    <PlasmaWave
      colors={["#EAB308", "#E2E8F0"]}
      speed1={0.06}
      speed2={0.06}
      focalLength={1.0}
      className="h-screen w-full"
    />
  );
}

Properties

PropTypeDefaultDescription
colors[string, string]["#A855F7", "#06B6D4"]Array of two hex colors - one for each plasma wave band.
speed1number0.05Speed of the first plasma wave.
speed2number0.05Speed of the second plasma wave.
focalLengthnumber0.8Focal length of the camera projection.
opacitynumber1Canvas opacity (0-1). Use to blend with background layers.
classNamestringAdditional CSS classes for the container.
childrenReactNodeOverlay content to display on top of the plasma wave.