Lazy-ui
Lazy-ui
registry components
DocsComponentsBlocksChangelog
GitHub0Install
Navigation11 groups
Get StartedDocs
  • Introduction
  • Installation
  • Changelog
  • All Components
Background13 items
  • Wave CipherNew
  • Horizon CipherNew
  • Orbit CipherNew
  • Orbit BloomNew
  • Orbit MeshNew
  • Aurora MeshNew
  • Chroma FlowNew
  • Prism DriftNew
  • Shadow MeshNew
  • Slime BackgroundNew
  • NeumorphismNew
  • Ripple SurfaceNew
  • Liquid ChromeNew
Text Animate7 items
  • Shiny Text
  • Text WarpNew
  • Text RiseNew
  • Text SpinNew
  • Text ScrambleNew
  • Spinning TextNew
  • Text FlipNew
Animate6 items
  • Counter
  • Liquid RevealNew
  • Liquid TransitionNew
  • Matrix GridNew
  • Particle HaloNew
  • Bling TransitionNew
Effects2 items
  • Reveal Animate
  • Circle CipherNew
Forms2 items
  • Switch
  • Checkbox
Buttons3 items
  • Copy Button
  • GitHub Stars Button
  • Glass ButtonNew
Feedback1 item
  • Progress
Navigation1 item
  • Animated Tabs
Overlay1 item
  • Animate Tooltip
Device Mocks1 item
  • iPhoneNew

Prism Drift

A four-corner gradient warped by an fbm flow field with chromatic dispersion at the peaks and iridescent rainbow shimmer — six color presets, cursor eddy, pauses when off-screen.

prism-drift

Backgrounds are awesome :)

0px

Customize

Edit props; preview updates instantly.

Customize
Palette
Layout
Softness
0.76
Intensity
1.10
Grain
0.20
Speed
0.60x
Drift
0.050
Mouse pull
0.40

Props

Props accepted by PrismDrift.

PropTypeDefaultDescription
childrenReactNode—Content rendered above the canvas. Wrapped in `relative z-10` so layout sits on top of the gradient.
palette"ember" | "iris" | "ocean" | "candy" | "void" | "silver""ember"Color preset. Each preset is a multi-stop radial palette: index 0 sits at the corner (brightest), the last stop blends into the background at the falloff radius.
colorsstring[]—Custom multi-stop palette (2–6 entries). Same convention as the presets: index 0 = bright inner stop, last = outer stop. Accepts hex, `rgb()`/`rgba()`, or `hsl()`. Overrides `palette`.
layout"diagonal" | "anti-diagonal" | "corners""diagonal"Which corners are lit. `diagonal` = top-right + bottom-left (matches the reference shape); `anti-diagonal` flips to top-left + bottom-right; `corners` lights all four.
softnessnumber0.72Glow falloff radius (0–1). Higher = blobs bleed further across the canvas. Internally maps to a Gaussian alpha falloff so the edge is always smooth.
intensitynumber1.1Color brightness multiplier (0–2). At `1` the palette renders at its native brightness; above `1` lets the corners blow out for a hot-glow look.
grainnumber0.18Grain dither amount (0–0.5). Modulated by local luminance — dark zones stay clean, the gradient edges acquire a gritty film-stock dither.
speednumber0.6Animation speed multiplier. `0` freezes the anchors on their corner positions.
driftnumber0.05How far each anchor orbits its corner (0–0.2 in UV units). Independent phase per anchor so the blobs breathe asynchronously.
mouseFollowbooleantruePointer subtly tugs the nearest anchor toward the cursor — keeps the orbital drift visible, just biased toward the pointer.
mouseInfluencenumber0.4Cursor pull strength (0–1).
backgroundColorstringpalette's bgSolid fill drawn behind the glows. Defaults to the preset's background (typically black). Used as the reduced-motion CSS fallback base.
classNamestring—Extra class names merged onto the outermost wrapper. Width and height are governed here — the canvas fills the container.

Installation

Choose CLI for the one-line shadcn install, or copy the file manually.

npx shadcn@latest add https://2lazyui.com/r/prism-drift.json

Usage

Import the component and drop it into a render.

demo.tsx21 lines
import { PrismDrift } from "@/components/lazy-ui/prism-drift";

export function Demo() {
  return (
    <PrismDrift
      palette="ember"
      layout="diagonal"
      softness={0.76}
      intensity={1.1}
      grain={0.2}
      speed={0.6}
      className="min-h-[520px] rounded-2xl"
    >
      <main className="relative z-10 flex h-full items-center justify-center px-6">
        <h1 className="text-center text-5xl font-light tracking-tight text-white">
          Backgrounds are awesome :)
        </h1>
      </main>
    </PrismDrift>
  );
}
Registryv0.1
Animated TabsNavigationCopy ButtonButtonsGitHub Stars ButtonButtonsReveal AnimateEffectsCounterAnimateShiny TextText AnimateText WarpText AnimateText RiseText AnimateText SpinText AnimateText ScrambleText AnimateSpinning TextText AnimateText FlipText AnimateProgressFeedbackSwitchFormsGlass ButtonButtonsCheckboxFormsiPhoneDevice MocksCircle CipherEffectsLiquid RevealAnimateLiquid TransitionAnimateWave CipherBackgroundHorizon CipherBackgroundOrbit CipherBackgroundOrbit BloomBackgroundOrbit MeshBackgroundMatrix GridAnimateParticle HaloAnimateAurora MeshBackgroundChroma FlowBackgroundPrism DriftBackgroundShadow MeshBackgroundSlime BackgroundBackgroundNeumorphismBackgroundRipple SurfaceBackgroundLiquid ChromeBackgroundBling TransitionAnimateAnimate TooltipOverlayPricing · ClassicBlocks · PricingPricing · BentoBlocks · PricingPricing · EditorialBlocks · PricingPricing · MatrixBlocks · PricingPricing · UsageBlocks · Pricing
Browse all 42 components
Up nextRoadmap
DialogPlanned
TabsPlanned
TooltipPlanned
CommandPlanned
Help the project
Star on GitHubSuggest a componentRead the DESIGN.md