Firefly Field
Warm motes drifting over a dark clearing, each fading up and down on its own timing so the field never repeats.
- lines of CSS
- 46lines of CSS
- dependencies
- 0dependencies
- browser, for years
- Everybrowser, for years
- stops under reduced motion
- Guardedstops under reduced motion
Vue, Svelte, styled-components and Tailwind exports are part of Pro. HTML, CSS and React are free forever.
.fx-v13-gl-firefly-15482 {
position: relative;
width: 210px;
height: 118px;
border-radius: 0.7rem;
overflow: hidden;
background: radial-gradient(120% 100% at 50% 120%, #0b2419, #04070c 70%);
box-shadow: inset 0 0 30px rgba(0,0,0,0.8);
}
.fx-v13-gl-firefly-15482 i {
position: absolute;
width: 6px;
height: 6px;
border-radius: 50%;
background: #fde68a;
box-shadow: 0 0 12px 3px rgba(253,230,138,0.7);
animation: fx-v13-gl-firefly-15482-drift 7s ease-in-out infinite;
}
.fx-v13-gl-firefly-15482 i:nth-child(1) { left: 12%; top: 62%; animation-delay: 0s; animation-duration: 6.5s; }
.fx-v13-gl-firefly-15482 i:nth-child(2) { left: 30%; top: 34%; animation-delay: -1.1s; animation-duration: 8s; }
.fx-v13-gl-firefly-15482 i:nth-child(3) { left: 48%; top: 72%; animation-delay: -2.3s; animation-duration: 7.4s; }
.fx-v13-gl-firefly-15482 i:nth-child(4) { left: 62%; top: 26%; animation-delay: -3.4s; animation-duration: 9s; }
.fx-v13-gl-firefly-15482 i:nth-child(5) { left: 76%; top: 58%; animation-delay: -4.2s; animation-duration: 6.8s; }
.fx-v13-gl-firefly-15482 i:nth-child(6) { left: 88%; top: 40%; animation-delay: -5.1s; animation-duration: 8.6s; }
.fx-v13-gl-firefly-15482 i:nth-child(7) { left: 20%; top: 18%; animation-delay: -2.8s; animation-duration: 7.9s; }
@keyframes fx-v13-gl-firefly-15482-drift {
0%, 100% { transform: translate(0, 0) scale(0.6); opacity: 0.15; }
25% { transform: translate(10px, -14px) scale(1); opacity: 1; }
55% { transform: translate(-8px, -26px) scale(0.8); opacity: 0.5; }
80% { transform: translate(6px, -10px) scale(1); opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
.fx-v13-gl-firefly-15482,
.fx-v13-gl-firefly-15482::before,
.fx-v13-gl-firefly-15482::after,
.fx-v13-gl-firefly-15482 *,
.fx-v13-gl-firefly-15482 *::before,
.fx-v13-gl-firefly-15482 *::after {
animation-duration: 1ms !important;
animation-iteration-count: 1 !important;
animation-delay: 0ms !important;
transition-duration: 1ms !important;
transition-delay: 0ms !important;
}
}<div class="fx-v13-gl-firefly-15482">
<i></i>
<i></i>
<i></i>
<i></i>
<i></i>
<i></i>
<i></i>
</div>What do I do with this?
- Put
firefly-field-15483.cssanywhere your page already loads CSS from — in Next.js that isapp/globals.css, or any stylesheet with a<link>in your HTML. - Then put the class on the element you want it on:
<button class="fx-v13-gl-firefly-15482">. The CSS does nothing until a class name in it matches something on the page.
- Link the stylesheet, then paste the markup wherever you need it.
npx hoverlab add firefly-field-15483What's included
- The markup and the stylesheet, in whichever framework you pick
- No runtime dependencies
Works with
- React
- Vue
- Svelte
- Tailwind
- styled-components
- Plain CSS
npx hoverlab add firefly-field-15483
Or over MCP, from your editor's agent — no account needed.
License
Free to read, copy and install, for personal and non-commercial projects. Shipping it in client work or a paid product needs Pro ($79 once). The source lands in your repo and stops being ours — no attribution, nothing to upgrade.
Motion safety
Static estimate, read from the CSS
- Reduced motion
- Guarded
Ships a
prefers-reduced-motionblock, so the loop settles into its end state for visitors who ask for less motion. - What it animates
- Compositor only
Only
transform,opacityorfilter: the GPU can run it without re-laying-out or repainting the page. - Flashing (WCAG 2.3.1)
- Under 3 flashes/s
Its brightest loop is about 0.3 a second. Estimated from duration, iterations and keyframes, not from rendered frames.
- Layout shift (CLS)
- No shift expected
Nothing it animates moves or resizes the box in flow. Measured in Chromium: no layout shifts in 4 s.
Every row is read from the shipped CSS. Only a figure marked measured came from a browser. Customizing the speed changes the timing, so recheck a customized copy. How it is computed
32 more effects in Glow & Neon
All of them free to read, copy and install — no account, no locked tiles, no watermarked preview. The whole catalog is open, and so are the API and the CLI.
Browse Glow & NeonShipping one commercially
Copying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.
- A commercial licence for everything in the catalog
- Unlimited bundle exports, in Vue, Svelte and Tailwind
- One payment — no subscription, nothing to renew
7 variations of Firefly Field
Finished looks, each one a position in the customizer above. Copy any of them, or open it and keep moving the sliders.