Menu

I made a 9 KB northern lights background for any website (no WebGL)
📰

I made a 9 KB northern lights background for any website (no WebGL)

DEV Community: css·Frantisek Gejdos·5 days ago
#BUNdqdjf
#devtocss#devto#dev#aurora#light
Long article (748 words) — no AI summary yet.
Reading 0:00
15s threshold

Aurora backgrounds are everywhere right now. Most of the ones I found are either a blurred CSS gradient that never really looks like an aurora, or a WebGL shader that pulls in a whole library.

I wanted something in between: real curtains of light that shimmer and drift, that you add with one script tag, and that don't make a laptop fan spin up. So I built Aurora , a free MIT package with zero dependencies, about 9 KB minified.

Live demo: https://fluri.xyz/aurora/

<script src = "https://cdn.jsdelivr.net/npm/@fluritheme/aurora@1/dist/aurora.global.js" data-auto ></script>

Enter fullscreen mode

Exit fullscreen mode

Or with npm:

import { createAurora } from "@fluritheme/aurora" ;

const aurora = createAurora ( { palette : "classic" , height : 0.6 } ) ; aurora . pulse ( ) ; // a wave of light aurora . shootingStar ( ) ;

Enter fullscreen mode

Exit fullscreen mode

Here are the three tricks that made it look right and stay cheap.

1. Draw it tiny, then let the browser blur it

An aurora is soft.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.