# Writing Lines Loader

> Gradient lines that draw themselves in one after another, great for "generating response" states.

- Category: [CSS Loaders & Spinners](https://copy-css.com/category/loaders)
- Tags: ai, generating, text, document, typing
- Live preview: https://copy-css.com/snippets/writing-lines-loader
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="loader-lines" role="status" aria-label="Generating response">
  <span></span><span></span><span></span>
</div>
```

## CSS

```css
.loader-lines {
  display: grid;
  gap: 9px;
  width: 200px;
}

.loader-lines span {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #a78bfa, #60a5fa);
  transform-origin: left;
  animation: loader-lines-write 2.4s ease-in-out infinite;
}

.loader-lines span:nth-child(2) {
  width: 85%;
  animation-delay: 0.3s;
}

.loader-lines span:nth-child(3) {
  width: 55%;
  animation-delay: 0.6s;
}

@keyframes loader-lines-write {
  0% { transform: scaleX(0); opacity: 1; }
  40%, 75% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .loader-lines span { animation: none; opacity: 0.7; }
}
```

## Notes

- This CSS Writing Lines Loader is 33 lines of pure CSS (0.7 KB) with no JavaScript and no dependencies. It uses keyframe animations, transforms, linear gradients and CSS Grid.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
