Battery Charging Loop
A copy-paste animated icons component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Animated IconsHTMLCSSany framework
Copy into your project
HTML
<div class="nuda-ai2-battery-charge" role="img" aria-label="Battery charging">
<svg class="nuda-ai2-battery-charge__svg" viewBox="0 0 24 24" aria-hidden="true">
<rect class="nuda-ai2-battery-charge__shell" x="1" y="6" width="18" height="12" rx="2" ry="2" />
<line class="nuda-ai2-battery-charge__nub" x1="22" y1="10" x2="22" y2="14" />
<rect class="nuda-ai2-battery-charge__fill" x="3" y="8" width="14" height="8" rx="1" />
<path class="nuda-ai2-battery-charge__bolt" d="M11 10l-2.5 4h2l-1 3.5L13 13h-2l1-3z" />
</svg>
</div>CSS
.nuda-ai2-battery-charge {
display: inline-flex;
align-items: center;
justify-content: center;
width: 56px;
height: 48px;
background: #09090b;
border: 1px solid rgba(255,255,255,.1);
border-radius: 10px;
color: #fafafa;
}
.nuda-ai2-battery-charge__svg {
width: 32px;
height: 32px;
fill: none;
}
.nuda-ai2-battery-charge__shell,.nuda-ai2-battery-charge__nub {
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
}
.nuda-ai2-battery-charge__fill {
fill: #e4ff54;
stroke: none;
transform-origin: 3px 12px;
animation: _nuda-ai2battery-charge 2.6s ease-in-out infinite;
}
.nuda-ai2-battery-charge__bolt {
fill: #e4ff54;
stroke: none;
animation: nuda-ai2-battery-charge-bolt 2.6s ease-in-out infinite;
}
@keyframes _nuda-ai2battery-charge {
0% {
transform: scaleX(.06);
opacity: .55;
}
70% {
transform: scaleX(1);
opacity: 1;
}
85% {
transform: scaleX(1);
opacity: 1;
}
100% {
transform: scaleX(.06);
opacity: .55;
}
}
@keyframes nuda-ai2-battery-charge-bolt {
0%,60% {
opacity: 0;
}
75%,95% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-ai2-battery-charge__fill,.nuda-ai2-battery-charge__bolt {
animation: none !important;
}
.nuda-ai2-battery-charge__fill {
transform: scaleX(1);
opacity: 1;
}
.nuda-ai2-battery-charge__bolt {
opacity: 1;
}
}
How to use Battery Charging Loop
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.