Grainy Gradient Mesh
A copy-paste noise & grain component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Noise & GrainHTMLCSSany framework
Copy into your project
HTML
<!-- Grainy Gradient Mesh — drifting blurred blobs with a grain layer -->
<div class="nuda-ng2-mesh-grain">
<div class="nuda-ng2-mesh-grain__blob nuda-ng2-mesh-grain__blob--a" aria-hidden="true"></div>
<div class="nuda-ng2-mesh-grain__blob nuda-ng2-mesh-grain__blob--b" aria-hidden="true"></div>
<div class="nuda-ng2-mesh-grain__grain" aria-hidden="true"></div>
</div>CSS
.nuda-ng2-mesh-grain {
position: relative;
width: 100%;
max-width: 220px;
height: 130px;
border-radius: 14px;
overflow: hidden;
background: #09090b;
isolation: isolate;
}
.nuda-ng2-mesh-grain__blob {
position: absolute;
width: 110px;
height: 110px;
border-radius: 50%;
filter: blur(28px);
pointer-events: none;
}
.nuda-ng2-mesh-grain__blob--a {
top: -20px;
left: -10px;
background: radial-gradient(circle,rgba(228,255,84,.7),transparent 70%);
animation: _nuda-ng2meshgrain-a 9s ease-in-out infinite alternate;
}
.nuda-ng2-mesh-grain__blob--b {
bottom: -30px;
right: -20px;
background: radial-gradient(circle,rgba(120,80,255,.55),transparent 70%);
animation: _nuda-ng2meshgrain-b 11s ease-in-out infinite alternate;
}
.nuda-ng2-mesh-grain__grain {
position: absolute;
inset: 0;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
background-size: 120px 120px;
opacity: .22;
mix-blend-mode: overlay;
pointer-events: none;
}
@keyframes _nuda-ng2meshgrain-a {
0% {
transform: translate3d(0,0,0) scale(1);
}
100% {
transform: translate3d(30px,20px,0) scale(1.2);
}
}
@keyframes _nuda-ng2meshgrain-b {
0% {
transform: translate3d(0,0,0) scale(1);
}
100% {
transform: translate3d(-24px,-16px,0) scale(1.15);
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-ng2-mesh-grain__blob--a,.nuda-ng2-mesh-grain__blob--b {
animation: none;
}
}
How to use Grainy Gradient Mesh
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.