# Battery Charging Loader

> A battery outline that fills up in four steps, ideal for charging or power-related loading states.

- Category: [CSS Loaders & Spinners](https://copy-css.com/category/loaders)
- Tags: charge, power, steps, level, energy
- Live preview: https://copy-css.com/snippets/battery-loader
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="loader-battery" role="status" aria-label="Charging"></div>
```

## CSS

```css
.loader-battery {
  position: relative;
  box-sizing: border-box;
  width: 68px;
  height: 34px;
  padding: 3px;
  border: 3px solid #334155;
  border-radius: 7px;
}

/* Terminal */
.loader-battery::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -8px;
  width: 4px;
  height: 12px;
  border-radius: 0 2px 2px 0;
  background: #334155;
  transform: translateY(-50%);
}

/* Charge level */
.loader-battery::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background: #22c55e;
  animation: loader-battery-charge 2.4s steps(4, jump-start) infinite;
}

@keyframes loader-battery-charge {
  from { width: 0; }
  to { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .loader-battery::before { animation-duration: 5s; }
}
```

## Notes

- This CSS Battery Charging Loader is 42 lines of pure CSS (0.8 KB) with no JavaScript and no dependencies. It uses keyframe animations, transforms and reduced-motion support.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
