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.
| Component | ID | What to look for |
|---|---|---|
| Corona Veil | eclipse | Watch the corona turn around the edge of the disc. |
| Clerestory Light | god-rays | Shafts of window light drift through haze. |
| Spectrum Fan | prism | A narrow beam opens into a moving spectrum. |
| Filament Drift | light-trails | Follow the individual filaments as they cross. |
| Fluted Pane | reeded-glass | Each rib bends the ribbon of light passing behind it. |
| Mercury Drop | liquid-blob | Studio lights slide across a reshaping chrome drop. |
| Relief Atlas | contour | Fine lines trace the changing elevation of a surface. |
| Offset Ink | risograph | Two angled ink screens overlap on a paper ground. |
| Raster Sky | dither-gradient | Ordered pixels blend discrete swatches into a moving sky. |
| Phosphor Trace | oscilloscope | A 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.
| Component | ID | What to look for |
|---|---|---|
| Pointer Lantern | cursor-glow | Move the pointer or focus the field and use the arrow keys to move the light. |
| Lightwell Grid | spotlight-grid | Move across the gaps or use the arrow keys to trace the card edges with one light. |
| Perimeter Runner | border-beam | Follow the light around the perimeter of the card. |
| Terrain Scroll | scroll-stir | Scroll inside the field, or focus it and press Page Down. The contours twist and settle as you stop. |
| Frosted Lens | glass-panel | Move the light across the glass to see the pixels soften through the pane. |
| Pixel Dissolve | dither-reveal | Hover 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 Tabs | glow-tabs | Select a material or use the arrow keys to switch between tabs. |
| Beacon Palette | glow-command | Filter the commands, use the arrow keys to highlight one, then press Enter to open its component. |
| Portrait Stack | dither-avatars | Hover over an avatar or move through the group with Tab to reveal its image and name. |
| Pixel Meter | dither-progress | Change the completion value or switch to indeterminate progress. |
| Raster Plot | dither-chart | Point 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.
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.