Animated Mesh Gradient
🟢 CSS OnlyA gorgeous, fluid mesh gradient featuring soft colorful spheres blending into each other with organic movement.
Responsive Horizontal Leaderboard
Slot ID: ca-pub-detail-below-preview
Interactive Settings
Medium Rectangle Block
Slot ID: ca-pub-detail-after-customization
Quick Copy Actions
Download File Packages
Keyboard Shortcuts
Responsive Horizontal Leaderboard
Slot ID: ca-pub-detail-before-related
More in Gradient
Loading Canvas Shader...
Aurora Flow
An elegant recreation of the northern lights, showing soft waves of emerald green and violet drifting on a dark sky.
Loading Canvas Shader...
Sunset Gradient
A calming gradient transition mirroring a beautiful sunset, blending deep purples, fiery oranges, and golden yellows.
Loading Canvas Shader...
Ocean Gradient
Soothing deep marine, aqua, and emerald tones morphing in an infinite wave-like gradient pattern.
Animated Mesh Gradient - CSS-only Gradient background for React & Tailwind
Integrate the Animated Mesh Gradient directly into your website. This asset is rendered using pure CSS and HTML keyframes. It is optimized for zero layout-shifts and runs with high-performance hardware-accelerated processing.
⚡ Performance Specifications
- Render Mode: CSS-ONLY (CSS-only)
- Fluidity: Locked at 60fps dynamic loop
- Bundle Footprint: Zero external NPM dependencies
- SEO Indexing status: 100% Crawlable static semantic HTML
🛠️ Integration Capabilities
Our templates expose inline design tokens like --color-1 and --color-2 for infinite color palettes. This template is designed to fit inside hero elements, full-screen landing pages, and interactive presentation cards.
Technical Code Reference & Syntaxes for Googlebot & Crawlers
The snippets below display the direct, unminified source code utilized for rendering this background.
HTML & Inline CSS Snippet (Vanilla)
<!-- index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Animated Mesh Gradient</title>
<style>
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
background: #09090b;
}
:root {
--color-bg: #09090b;
--color-1: #7c5cff;
--color-2: #18c5ff;
--color-3: #f43f5e;
--color-4: #eab308;
--blur-amount: 80px;
--speed: 20s;
}
.mesh-gradient-container {
position: relative;
width: 100%;
height: 100%;
background: var(--color-bg);
overflow: hidden;
z-index: 1;
}
.mesh-ball {
position: absolute;
border-radius: 50%;
filter: blur(var(--blur-amount));
opacity: 0.6;
mix-blend-mode: screen;
}
.mesh-ball-1 {
width: 50%;
height: 50%;
background: var(--color-1);
top: 10%;
left: 10%;
animation: mesh-drift-1 var(--speed) infinite ease-in-out alternate;
}
.mesh-ball-2 {
width: 60%;
height: 60%;
background: var(--color-2);
bottom: 10%;
right: 10%;
animation: mesh-drift-2 var(--speed) infinite ease-in-out alternate;
}
.mesh-ball-3 {
width: 45%;
height: 45%;
background: var(--color-3);
top: 40%;
right: 20%;
animation: mesh-drift-3 var(--speed) infinite ease-in-out alternate;
}
.mesh-ball-4 {
width: 55%;
height: 55%;
background: var(--color-4);
bottom: 20%;
left: 20%;
animation: mesh-drift-4 var(--speed) infinite ease-in-out alternate;
}
@keyframes mesh-drift-1 {
0% { transform: translate(0, 0) scale(1); }
50% { transform: translate(20%, 15%) scale(1.1); }
100% { transform: translate(-10%, -5%) scale(0.9); }
}
@keyframes mesh-drift-2 {
0% { transform: translate(0, 0) scale(1); }
50% { transform: translate(-15%, -20%) scale(0.85); }
100% { transform: translate(10%, 10%) scale(1.15); }
}
@keyframes mesh-drift-3 {
0% { transform: translate(0, 0) scale(0.9); }
50% { transform: translate(-25%, 10%) scale(1.1); }
100% { transform: translate(15%, -15%) scale(1); }
}
@keyframes mesh-drift-4 {
0% { transform: translate(0, 0) scale(1.1); }
50% { transform: translate(10%, -25%) scale(0.9); }
100% { transform: translate(-15%, 15%) scale(1.05); }
}
</style>
</head>
<body>
<div class="mesh-gradient-container">
<div class="mesh-ball mesh-ball-1"></div>
<div class="mesh-ball mesh-ball-2"></div>
<div class="mesh-ball mesh-ball-3"></div>
<div class="mesh-ball mesh-ball-4"></div>
</div>
</body>
</html>React Component Wrapper (TSX)
import React from 'react';
export default function AnimatedMeshGradientBackground() {
return (
<div
style={{ width: '100%', height: '100%', position: 'relative', overflow: 'hidden' }}
>
<style dangerouslySetInnerHTML={{ __html: `
:root {
--color-bg: #09090b;
--color-1: #7c5cff;
--color-2: #18c5ff;
--color-3: #f43f5e;
--color-4: #eab308;
--blur-amount: 80px;
--speed: 20s;
}
.mesh-gradient-container {
position: relative;
width: 100%;
height: 100%;
background: var(--color-bg);
overflow: hidden;
z-index: 1;
}
.mesh-ball {
position: absolute;
border-radius: 50%;
filter: blur(var(--blur-amount));
opacity: 0.6;
mix-blend-mode: screen;
}
.mesh-ball-1 {
width: 50%;
height: 50%;
background: var(--color-1);
top: 10%;
left: 10%;
animation: mesh-drift-1 var(--speed) infinite ease-in-out alternate;
}
.mesh-ball-2 {
width: 60%;
height: 60%;
background: var(--color-2);
bottom: 10%;
right: 10%;
animation: mesh-drift-2 var(--speed) infinite ease-in-out alternate;
}
.mesh-ball-3 {
width: 45%;
height: 45%;
background: var(--color-3);
top: 40%;
right: 20%;
animation: mesh-drift-3 var(--speed) infinite ease-in-out alternate;
}
.mesh-ball-4 {
width: 55%;
height: 55%;
background: var(--color-4);
bottom: 20%;
left: 20%;
animation: mesh-drift-4 var(--speed) infinite ease-in-out alternate;
}
@keyframes mesh-drift-1 {
0% { transform: translate(0, 0) scale(1); }
50% { transform: translate(20%, 15%) scale(1.1); }
100% { transform: translate(-10%, -5%) scale(0.9); }
}
@keyframes mesh-drift-2 {
0% { transform: translate(0, 0) scale(1); }
50% { transform: translate(-15%, -20%) scale(0.85); }
100% { transform: translate(10%, 10%) scale(1.15); }
}
@keyframes mesh-drift-3 {
0% { transform: translate(0, 0) scale(0.9); }
50% { transform: translate(-25%, 10%) scale(1.1); }
100% { transform: translate(15%, -15%) scale(1); }
}
@keyframes mesh-drift-4 {
0% { transform: translate(0, 0) scale(1.1); }
50% { transform: translate(10%, -25%) scale(0.9); }
100% { transform: translate(-15%, 15%) scale(1.05); }
}
` }} />
{/* HTML Structure */}
<div
style={{ width: '100%', height: '100%' }}
dangerouslySetInnerHTML={{ __html: `
<div class="mesh-gradient-container">
<div class="mesh-ball mesh-ball-1"></div>
<div class="mesh-ball mesh-ball-2"></div>
<div class="mesh-ball mesh-ball-3"></div>
<div class="mesh-ball mesh-ball-4"></div>
</div>
` }}
/>
</div>
);
}Next.js App Router Component (use client)
'use client';
import React from 'react';
export default function AnimatedMeshGradientBackground() {
return (
<div
className="w-full h-full relative overflow-hidden"
>
<style dangerouslySetInnerHTML={{ __html: `
:root {
--color-bg: #09090b;
--color-1: #7c5cff;
--color-2: #18c5ff;
--color-3: #f43f5e;
--color-4: #eab308;
--blur-amount: 80px;
--speed: 20s;
}
.mesh-gradient-container {
position: relative;
width: 100%;
height: 100%;
background: var(--color-bg);
overflow: hidden;
z-index: 1;
}
.mesh-ball {
position: absolute;
border-radius: 50%;
filter: blur(var(--blur-amount));
opacity: 0.6;
mix-blend-mode: screen;
}
.mesh-ball-1 {
width: 50%;
height: 50%;
background: var(--color-1);
top: 10%;
left: 10%;
animation: mesh-drift-1 var(--speed) infinite ease-in-out alternate;
}
.mesh-ball-2 {
width: 60%;
height: 60%;
background: var(--color-2);
bottom: 10%;
right: 10%;
animation: mesh-drift-2 var(--speed) infinite ease-in-out alternate;
}
.mesh-ball-3 {
width: 45%;
height: 45%;
background: var(--color-3);
top: 40%;
right: 20%;
animation: mesh-drift-3 var(--speed) infinite ease-in-out alternate;
}
.mesh-ball-4 {
width: 55%;
height: 55%;
background: var(--color-4);
bottom: 20%;
left: 20%;
animation: mesh-drift-4 var(--speed) infinite ease-in-out alternate;
}
@keyframes mesh-drift-1 {
0% { transform: translate(0, 0) scale(1); }
50% { transform: translate(20%, 15%) scale(1.1); }
100% { transform: translate(-10%, -5%) scale(0.9); }
}
@keyframes mesh-drift-2 {
0% { transform: translate(0, 0) scale(1); }
50% { transform: translate(-15%, -20%) scale(0.85); }
100% { transform: translate(10%, 10%) scale(1.15); }
}
@keyframes mesh-drift-3 {
0% { transform: translate(0, 0) scale(0.9); }
50% { transform: translate(-25%, 10%) scale(1.1); }
100% { transform: translate(15%, -15%) scale(1); }
}
@keyframes mesh-drift-4 {
0% { transform: translate(0, 0) scale(1.1); }
50% { transform: translate(10%, -25%) scale(0.9); }
100% { transform: translate(-15%, 15%) scale(1.05); }
}
` }} />
{/* HTML Structure */}
<div
className="w-full h-full"
dangerouslySetInnerHTML={{ __html: `
<div class="mesh-gradient-container">
<div class="mesh-ball mesh-ball-1"></div>
<div class="mesh-ball mesh-ball-2"></div>
<div class="mesh-ball mesh-ball-3"></div>
<div class="mesh-ball mesh-ball-4"></div>
</div>
` }}
/>
</div>
);
}Raw CSS Stylesheet Snippet
:root {
--color-bg: #09090b;
--color-1: #7c5cff;
--color-2: #18c5ff;
--color-3: #f43f5e;
--color-4: #eab308;
--blur-amount: 80px;
--speed: 20s;
}
.mesh-gradient-container {
position: relative;
width: 100%;
height: 100%;
background: var(--color-bg);
overflow: hidden;
z-index: 1;
}
.mesh-ball {
position: absolute;
border-radius: 50%;
filter: blur(var(--blur-amount));
opacity: 0.6;
mix-blend-mode: screen;
}
.mesh-ball-1 {
width: 50%;
height: 50%;
background: var(--color-1);
top: 10%;
left: 10%;
animation: mesh-drift-1 var(--speed) infinite ease-in-out alternate;
}
.mesh-ball-2 {
width: 60%;
height: 60%;
background: var(--color-2);
bottom: 10%;
right: 10%;
animation: mesh-drift-2 var(--speed) infinite ease-in-out alternate;
}
.mesh-ball-3 {
width: 45%;
height: 45%;
background: var(--color-3);
top: 40%;
right: 20%;
animation: mesh-drift-3 var(--speed) infinite ease-in-out alternate;
}
.mesh-ball-4 {
width: 55%;
height: 55%;
background: var(--color-4);
bottom: 20%;
left: 20%;
animation: mesh-drift-4 var(--speed) infinite ease-in-out alternate;
}
@keyframes mesh-drift-1 {
0% { transform: translate(0, 0) scale(1); }
50% { transform: translate(20%, 15%) scale(1.1); }
100% { transform: translate(-10%, -5%) scale(0.9); }
}
@keyframes mesh-drift-2 {
0% { transform: translate(0, 0) scale(1); }
50% { transform: translate(-15%, -20%) scale(0.85); }
100% { transform: translate(10%, 10%) scale(1.15); }
}
@keyframes mesh-drift-3 {
0% { transform: translate(0, 0) scale(0.9); }
50% { transform: translate(-25%, 10%) scale(1.1); }
100% { transform: translate(15%, -15%) scale(1); }
}
@keyframes mesh-drift-4 {
0% { transform: translate(0, 0) scale(1.1); }
50% { transform: translate(10%, -25%) scale(0.9); }
100% { transform: translate(-15%, 15%) scale(1.05); }
}