Sparkle Line
A copy-paste dividers component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
DividersHTMLCSSany framework
Copy into your project
HTML
<div class="nuda-sparkle-line" role="separator" aria-hidden="true">
<span class="nuda-sparkle-line__base"></span>
<span class="nuda-sparkle-line__s nuda-sparkle-line__s--1"></span>
<span class="nuda-sparkle-line__s nuda-sparkle-line__s--2"></span>
<span class="nuda-sparkle-line__s nuda-sparkle-line__s--3"></span>
<span class="nuda-sparkle-line__s nuda-sparkle-line__s--4"></span>
<span class="nuda-sparkle-line__s nuda-sparkle-line__s--5"></span>
</div>CSS
/* Sparkle Line
Sparkles twinkle in sequence along the divider.
Customize: --sparkle-line-color */
.nuda-sparkle-line {
--sparkle-line-color: #e4ff54;
position: relative;
width: 100%;
height: 8px;
}
.nuda-sparkle-line__base {
position: absolute;
top: 50%;
left: 0;
right: 0;
height: 1px;
transform: translateY(-50%);
background: linear-gradient(90deg, transparent, rgba(228, 255, 84, 0.3), transparent);
}
.nuda-sparkle-line__s {
position: absolute;
top: 50%;
width: 4px;
height: 4px;
border-radius: 50%;
background: var(--sparkle-line-color);
box-shadow: 0 0 6px var(--sparkle-line-color);
transform: translate(-50%, -50%) scale(0);
opacity: 0;
animation: nuda-sparkle-line 2.4s ease-in-out infinite;
}
.nuda-sparkle-line__s--1 { left: 12%; animation-delay: 0s; }
.nuda-sparkle-line__s--2 { left: 32%; animation-delay: 0.5s; }
.nuda-sparkle-line__s--3 { left: 52%; animation-delay: 1s; }
.nuda-sparkle-line__s--4 { left: 72%; animation-delay: 1.5s; }
.nuda-sparkle-line__s--5 { left: 90%; animation-delay: 0.9s; }
@keyframes nuda-sparkle-line {
0%, 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
50% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
.nuda-sparkle-line__s {
animation: none;
opacity: 0.6;
transform: translate(-50%, -50%) scale(1);
}
}How to use Sparkle Line
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.