Gradient components

Discover the animated backgrounds and interactive React components in the Gradients library.

Animated backgrounds

These backgrounds run on the Gradients engine. Open an example to see its motion and available preview controls. Component IDs stay stable across display-name updates.

ComponentIDWhat to look for
Corona VeileclipseWatch the corona turn around the edge of the disc.
Clerestory Lightgod-raysShafts of window light drift through haze.
Spectrum FanprismA narrow beam opens into a moving spectrum.
Filament Driftlight-trailsFollow the individual filaments as they cross.
Fluted Panereeded-glassEach rib bends the ribbon of light passing behind it.
Mercury Dropliquid-blobStudio lights slide across a reshaping chrome drop.
Relief AtlascontourFine lines trace the changing elevation of a surface.
Offset InkrisographTwo angled ink screens overlap on a paper ground.
Raster Skydither-gradientOrdered pixels blend discrete swatches into a moving sky.
Phosphor TraceoscilloscopeA phosphor trace changes shape as its horizontal and vertical waves drift out of phase.

Interactive components

These components respond to pointer, scroll, focus, or application state. Use the examples to try their interactions before integrating them.

ComponentIDWhat to look for
Pointer Lanterncursor-glowMove the pointer or focus the field and use the arrow keys to move the light.
Lightwell Gridspotlight-gridMove across the gaps or use the arrow keys to trace the card edges with one light.
Perimeter Runnerborder-beamFollow the light around the perimeter of the card.
Terrain Scrollscroll-stirScroll inside the field, or focus it and press Page Down. The contours twist and settle as you stop.
Frosted Lensglass-panelMove the light across the glass to see the pixels soften through the pane.
Pixel Dissolvedither-revealHover or focus to dissolve the pixels. Try the pointer lens, visible-once, scroll, and manual modes. In lens mode, the arrow keys move the reveal.
Beacon Tabsglow-tabsSelect a material or use the arrow keys to switch between tabs.
Beacon Paletteglow-commandFilter the commands, use the arrow keys to highlight one, then press Enter to open its component.
Portrait Stackdither-avatarsHover over an avatar or move through the group with Tab to reveal its image and name.
Pixel Meterdither-progressChange the completion value or switch to indeterminate progress.
Raster Plotdither-chartPoint at the curve or use the arrow keys to read each sample.

Use a component in React

Import the stylesheet once. Set the height of a background container and pass the application data your widget needs. For example, BeaconTabs takes tabs, PortraitStack takes people, and RasterPlot takes data points.

Render a background and a progress indicator
import "@visualmodo/gradients/components.css";
import { CoronaVeil, PixelMeter } from "@visualmodo/gradients/components";

export function Example() {
  return (
    <>
      <CoronaVeil style={{ height: 360 }} params={{ speed: 0.5 }} />
      <PixelMeter value={64} label="Export progress" />
    </>
  );
}

Pixel Dissolve

Try Pixel Dissolve with the pointer and keyboard. The default hover mode is also triggered by focus. Use lens for pointer or arrow-key control, scroll for scroll-driven revealing, visible to reveal once in view, or manual with the revealed prop.

duration is expressed in milliseconds and cell in CSS pixels. Set palette to ultramarine, ember, mono, or provide custom colors. Reduced motion makes the reveal immediate. Remote images need compatible CORS headers for the pixel effect to read them.