# Stroke Drawing Text

> SVG text whose outline draws itself in with stroke-dasharray, then fills in with color.

- Category: [CSS Text Effects](https://copy-css.com/category/text)
- Tags: svg, stroke-dasharray, line drawing, outline, handwriting
- Live preview: https://copy-css.com/snippets/stroke-draw-text
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<svg class="text-draw" viewBox="0 0 280 90" role="img" aria-label="Hello">
  <text x="50%" y="70" text-anchor="middle">Hello</text>
</svg>
```

## CSS

```css
.text-draw {
  width: 260px;
  max-width: 100%;
  height: auto;
}

.text-draw text {
  font: 800 72px system-ui, sans-serif;
  fill: transparent;
  stroke: #0f766e;
  stroke-width: 1.5px;
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
  animation:
    text-draw-line 2.4s ease-in-out forwards,
    text-draw-fill 0.6s 2.2s ease forwards;
}

@keyframes text-draw-line {
  to { stroke-dashoffset: 0; }
}

@keyframes text-draw-fill {
  to { fill: #0f766e; }
}

@media (prefers-reduced-motion: reduce) {
  .text-draw text {
    animation: none;
    fill: #0f766e;
    stroke-dashoffset: 0;
  }
}
```

## Notes

- This CSS Stroke Drawing Text is 33 lines of pure CSS (0.6 KB) with no JavaScript and no dependencies. It uses keyframe animations and reduced-motion support.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
