{
  "id": "stroke-draw-text",
  "name": "Stroke Drawing Text",
  "category": "text",
  "tags": [
    "svg",
    "stroke-dasharray",
    "line drawing",
    "outline",
    "handwriting"
  ],
  "description": "SVG text whose outline draws itself in with stroke-dasharray, then fills in with color.",
  "url": "https://copy-css.com/snippets/stroke-draw-text",
  "markdown": "https://copy-css.com/snippets/stroke-draw-text.md",
  "html": "<svg class=\"text-draw\" viewBox=\"0 0 280 90\" role=\"img\" aria-label=\"Hello\">\n  <text x=\"50%\" y=\"70\" text-anchor=\"middle\">Hello</text>\n</svg>",
  "css": ".text-draw {\n  width: 260px;\n  max-width: 100%;\n  height: auto;\n}\n\n.text-draw text {\n  font: 800 72px system-ui, sans-serif;\n  fill: transparent;\n  stroke: #0f766e;\n  stroke-width: 1.5px;\n  stroke-dasharray: 360;\n  stroke-dashoffset: 360;\n  animation:\n    text-draw-line 2.4s ease-in-out forwards,\n    text-draw-fill 0.6s 2.2s ease forwards;\n}\n\n@keyframes text-draw-line {\n  to { stroke-dashoffset: 0; }\n}\n\n@keyframes text-draw-fill {\n  to { fill: #0f766e; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .text-draw text {\n    animation: none;\n    fill: #0f766e;\n    stroke-dashoffset: 0;\n  }\n}",
  "features": [
    "keyframe animations",
    "reduced-motion support"
  ],
  "customProperties": []
}
