Gradient Stripes

Pro

A brand gradient sliced into glowing stripes that rise toward the pointer.

backgroundgradientstripeswebglshaderherocursorfull bleed
Gradient Stripes component preview

Overview

Gradient Stripes is a React and Tailwind CSS WebGL background for hero sections, in Next.js or any React app, with no dependencies. A brand gradient glows up from the bottom like a horizon and is sliced into stripes that each slide their slice on a slow traveling wave, and stripes rise toward the pointer. Pass two to six colors, tune angle, gap, grain, and pull, and fade the edges so hero copy can sit on top. It stops off screen, and reduced motion freezes it on one frame. Set background to your page color so gaps blend in.

Installation

Run the following command

~/your-project
pnpm dlx wensity@latest add gradient-blind-backdrop

Usage

Import GradientBlindBackdrop from @/components/wensity/gradient-blind-backdrop and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.

app/example.tsx
import { GradientBlindBackdrop } from "@/components/wensity/gradient-blind-backdrop";
export default function Hero() {
return (
<GradientBlindBackdrop
className="h-[560px] w-full"
colors={["#0a0a0b", "#1e1b4b", "#6d28d9", "#e11d48", "#fb923c", "#fde68a"]}
background="#0a0a0b"
stripes={18}
>
<div className="flex h-full flex-col items-center pt-20 text-center text-white">
<h1 className="text-5xl font-semibold tracking-tight">Light, sliced into stripes.</h1>
</div>
</GradientBlindBackdrop>
);
}

Props

PropTypeDefaultDescription
colorsstring[]SunriseGradient stops from the top of the frame to the glowing bottom, 2 to 6 hex colours. Start with the page colour so the stripes melt into it.
backgroundstring"#0a0a0b"Page colour behind the stripes. Gaps and the edge fade blend into it, so a light value makes a light-mode backdrop.
stripesnumber18Number of stripes across the width. Narrow screens show fewer so none drops below 26px.
anglenumber0Stripe angle in degrees. 0 stands them upright.
wavenumber0.35How far the travelling wave slides each stripe, 0 to 1.
frequencynumber1Wave crests across the frame.
speednumber1Motion speed. 0 holds the field still until the pointer moves.
depthnumber0.55Rounded shading across each stripe, 0 keeps them flat.
gapnumber0Space between stripes in CSS pixels, filled with the background.
grainnumber0.35Film grain, 0 to 1.
mask"none" | "bottom" | "top" | "radial" | "edges""none"Fades the stripes into the background so content can sit on top.
pullnumber0.6How strongly the stripes rise toward the pointer. 0 turns it off.
dprnumber-Render scale. Defaults to the device ratio, capped at 2.
pausedbooleanfalseFreeze on the current frame.
childrenReactNode-Content layered above the stripes, such as hero copy.

Featured in React hero section components and React 3D components.