Top Gradient Radial
decorative
Browse grids, dots, gradients, and glows. Preview a pattern, then copy it as React code with Tailwind classes.
decorative
decorative
decorative
decorative
decorative
decorative
decorative
decorative
decorative
decorative
decorative
decorative
decorative
decorative
decorative
decorative
decorative
decorative
decorative
decorative
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
gradients
gradients
gradients
gradients
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
effects
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
geometric
gradients
gradients
gradients
gradients
gradients
gradients
gradients
gradients
gradients
gradients
gradients
gradients
effects
effects
gradients
effects
effects
effects
effects
effects
effects
gradients
effects
geometric
gradients
gradients
effects
decorative
geometric
decorative
geometric
geometric
geometric
decorative
geometric
decorative
decorative
This page is a library of background patterns made entirely from CSS gradients: grids, dot fields, stripes, paper textures, radial glows and soft color washes. Nothing is an image file. Filter by style, open a pattern to see it full size with sample text, and copy it as a React snippet with Tailwind classes. The sections below explain the structure of that snippet, how to convert it to plain HTML and CSS, how to adjust a pattern, and the stacking mistake that hides content behind it.
Every pattern copies as the same structure: a wrapper div with Tailwind classes (usually min-h-screen w-full relative, plus a base background color), and inside it an empty div with absolute inset-0 z-0 that carries the pattern in an inline style object. The style object holds the gradient layers in backgroundImage and, depending on the pattern, backgroundSize, a mask, or a blur filter.
Paste the snippet where the background should appear and replace the Your Content/Components comment with your own markup. The pattern layer is absolutely positioned, so keep the relative class on the wrapper; without it the layer stretches to the nearest positioned ancestor, often the whole page. Colors and sizes are edited directly in the copied code.
<div className="min-h-screen w-full bg-[#f8fafc] relative">
{/* Top Fade Grid Background */}
<div
className="absolute inset-0 z-0"
style={{
backgroundImage: `
linear-gradient(to right, #e2e8f0 1px, transparent 1px),
linear-gradient(to bottom, #e2e8f0 1px, transparent 1px)
`,
backgroundSize: "20px 30px",
WebkitMaskImage:
"radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%)",
maskImage:
"radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%)",
}}
/>
<main className="relative z-10">{/* your content */}</main>
</div>The most common problem after pasting is content that seems to vanish or cannot be clicked. The pattern layer is positioned with z-index 0, and browsers paint positioned layers after ordinary, non-positioned content in the same container. So a plain heading or form placed after the layer is drawn underneath it.
Give the content wrapper position: relative (the relative class), as in the example above. It then paints in source order after the pattern. Adding z-10 makes the order explicit and survives later edits. For a section rather than a full page, replace min-h-screen with the height you need, and add overflow-hidden to the wrapper when the pattern uses a blur.
The snippet is JSX, but the background itself is ordinary CSS. For plain HTML, change className to class, move the style object into a stylesheet rule, and rename each property from camelCase to its CSS name: backgroundImage becomes background-image, backgroundSize becomes background-size, and WebkitMaskImage becomes -webkit-mask-image. The template literal backticks around multi-line values disappear, and the Tailwind classes on the wrapper become position: relative, a background color and a minimum height.
.grid-bg {
position: relative;
min-height: 100vh;
background-color: #f8fafc;
}
.grid-bg::before {
content: "";
position: absolute;
inset: 0;
background-image:
linear-gradient(to right, #e2e8f0 1px, transparent 1px),
linear-gradient(to bottom, #e2e8f0 1px, transparent 1px);
background-size: 20px 30px;
-webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%);
mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%);
}
.grid-bg > * {
position: relative; /* keeps content above the ::before layer */
}Most geometric patterns follow the same recipe, so a few values control the result.
Gradient backgrounds work in every current browser. The masked patterns include both mask-image and -webkit-mask-image: the unprefixed property arrived in Chrome and Edge 120, Safari 15.4 and Firefox 53, so keep the prefixed line for older Chromium and Safari versions.
Several glow patterns in the Effects group put filter: blur(80px) on a full-size layer. A large blur costs more to paint than a plain gradient, and the cost comes back whenever the element resizes or animates. If a page feels heavy, build the glow with a wider transparent stop in the gradient instead of a blur. The blur also softens the layer's edges, which is why overflow-hidden on the wrapper keeps the glow tidy.
Patterns are decorative and are not announced by screen readers. The open preview shows sample text in black or white to suggest a text color, but check contrast with your actual text. Fine grids and dot fields directly behind long paragraphs make text harder to read; a faded variant or a solid panel behind the text works better.
Updated