So, it's been a while. Almost two years since my last article here, and work has kept me really busy. But I'm back, and I've got something to show you :)
Have you ever landed on a website where the background moves? Soft gradients drifting into each other, ribbons of colour, little points of light following your cursor? I've always loved those. And for a long time, I had an idea sitting in my notes app: what if adding one to your site was as easy as adding an image?
Two weeks ago, I finally shipped it. It's called Haze, and it gives you live backgrounds for your website. You pick a design, make it yours in the browser, then paste one tag into your site. It's under 9 KB, with no dependencies.
In this article, I'll walk you through why I built it, why I finally did it now, what I learned about shaders along the way, and what building it with AI was actually like. Let's jump right into it!
Just want to add one to your site? Skip to How to Use It
Where the Idea Came From
I've always been drawn to dynamic landing pages. Microinteractions, things that react when you move your mouse, and generally anything that makes a website feel alive and look different from the rest. If you've read my article on using mousemove to reveal background images, you already know this ;)
The problem is that the really nice ones are usually hard to add. You either pull in a 3D library, drop in a heavy background video, or spend hours writing shader code. That's a lot of work for a hero section.
What I wanted was something plug and play. Something I could drop into my own website or a client's project in a minute, without thinking about WebGL at all.
Why Now?
Honestly, Haze wasn't the only idea in that notes app. I've been collecting them for years, and most are small, design-related things I never found the time to build.
Two things changed this year.
First, I started the shaders section of Bruno Simon's Three.js Journey course. For the first time, the moving backgrounds I loved stopped feeling like magic, and I could see how they're actually made.
Second, AI tools got good enough that I could build an idea in days instead of months. So I figured, why not now? I picked the idea I'd held onto the longest and started there.
So, What is a Shader?
Shaders could sound intimidating, but the idea behind them is simple. Here's how I like to think about it.
Think of your screen as a grid of tiny squares called pixels. A shader is one rule that every pixel follows, all at the same time, to pick its own colour:
Your GPU (your computer's graphics chip) gets millions of pixels to follow that rule at once, about 60 times a second. That's really it!
Haze's backgrounds are just cleverer rules: ones that bend, ripple and blend colours, so you get ribbons, particles and soft gradients instead of a flat fade.
Because the GPU does all the work, the background stays sharp on any screen size, and it weighs a few kilobytes where a background video weighs megabytes. Haze also makes sure it doesn't waste your visitors' battery:
- It stops drawing when it's scrolled off screen or the tab is hidden.
- It shows a still frame for people who prefer reduced motion.
- If a browser doesn't support WebGL, a CSS gradient in the same colours shows instead, so nothing breaks.
How to Use It
Here's the fun part. Go to haze.mitolu.dev, pick one of the 20 designs (ribbons, particles, paper hills, soft gradients and more), and open it in the studio. There, you can change the colours, speed and scale, and pick a cursor effect: stir, trail or pixels.
When you're happy with it, click Export and copy the tag. To use it as the background of a hero section, add the following to your HTML:
<script src="https://haze.mitolu.dev/v1/haze.js" defer></script>
<section class="hero">
<haze-gradient preset="silk"></haze-gradient>
<h1>Your headline</h1>
</section>
Then, in your CSS, place the background behind your content:
.hero {
position: relative;
isolation: isolate;
min-height: 100vh;
}
.hero haze-gradient {
position: absolute;
inset: 0;
z-index: -1;
}
And that's it! The script loads once, and <haze-gradient> draws the design wherever you put it. The tag you copy from the studio carries your own colours and settings in place of preset="silk".
If you're working in React or Next.js, you can export it as a React component instead. There's also a vanilla JS option if you'd rather not use a custom element.
Using Haze on WordPress
The easiest way is a Custom HTML block, which lets you paste the whole hero, script included.
- Open the page in the block editor.
- Click the + button, search for Custom HTML, and add the block where you want the hero.
- Paste the following code, and swap the line for the tag you copied from the studio:
<script src="https://haze.mitolu.dev/v1/haze.js" defer></script>
<section style="position: relative; isolation: isolate; min-height: 80vh; display: grid; place-content: center; text-align: center; color: #fff;">
<haze-gradient preset="silk" style="position: absolute; inset: 0; z-index: -1;"></haze-gradient>
<h1>Your headline</h1>
<p>A short line about what you do.</p>
</section>
- Click Preview to see it moving, then publish.
The styles are inline here so you don't have to touch your theme's CSS. If you're on WordPress.com, note that adding scripts needs a plan that allows plugins. Self-hosted WordPress works out of the box.
Using Haze on Framer
In Framer, you'll use an Embed component and place it behind your hero's content.
- Select your hero section, and set its position so its children can be pinned (Framer frames do this by default).
- Open the Insert menu, find Embed, and drop it inside the hero.
- In the Embed's settings, set the type to HTML and paste:
<script src="https://haze.mitolu.dev/v1/haze.js" defer></script>
<haze-gradient preset="silk"></haze-gradient>
- Set the Embed's position to Absolute, pin it to all four edges, and set both width and height to fill the section.
- Move the Embed to the bottom of the layers list, so your text sits on top of it.
The <haze-gradient> element fills whatever box it's in, so once the Embed covers the section, the background does too. Preview the site to see it moving, since Framer's canvas doesn't always run embedded scripts while editing.
Two Weeks Later
I posted it on Twitter and LinkedIn, and about 120 people have tried it so far (from site analytics). That's a great start, and I'm grateful for every one of them.
But my favourite part happened in my DMs. Four people reached out because they wanted a background like this on their personal websites. Two of them said seeing my post made them want to pick up building their portfolio again, which honestly made my week.
So I helped themset it up, and each one was on a different platform:
- a plain HTML website
- WordPress
- Framer
- a Next.js app
It worked on all of them, which was exactly the point. One tag, wherever your site lives. On top of those 120 users, four real people using it on their real websites tells me the idea works.
Conclusion
And there you have it! An idea from my notes app, finally out in the world.
This is just the first version. I'm still exploring more shaders, and Haze is where everything I explore with will go next: WebGPU, textures and more designs. I've also got some more exciting updates coming soon, so stay tuned! And if you've had an idea sitting in your notes app for a while, maybe this is your sign to start!
Haze is live on Product Hunt today! If you'd like to support it, I'd really appreciate an upvote or a comment there. Support Haze on Product Hunt
Try it out at haze.mitolu.dev, and if you put one on your site, please share it with me. I'd love to see it.
If you have a question, kindly leave your feedback in the comments section.
Thanks for reading, and happy coding!
Resources for Further Learning
If this got you curious about shaders, these are the resources that helped me most:
- An Introduction to Shaders on Frontend Horse
- The Book of Shaders
- Three.js Journey by Bruno Simon
- Shadertoy: thousands of shaders you can run and tweak in the browser. Great for inspiration.
- Yuri Artiukh's YouTube channel


Top comments (0)