{
  "id": "multiline-typewriter",
  "name": "Multi-line Typewriter",
  "category": "text",
  "tags": [
    "typing",
    "two lines",
    "caret",
    "steps",
    "monospace",
    "hero"
  ],
  "description": "Two lines of monospace text typed out one after the other, with the caret moving down a line.",
  "url": "https://copy-css.com/snippets/multiline-typewriter",
  "markdown": "https://copy-css.com/snippets/multiline-typewriter.md",
  "html": "<p class=\"tw-lines\">\n  <span>Design faster.</span>\n  <span>Ship sooner.</span>\n</p>",
  "css": "/* Set --n on each line to its number of characters */\n.tw-lines {\n  margin: 0;\n  color: #1c1917;\n  font: 600 22px/1.5 ui-monospace, Menlo, monospace;\n}\n\n.tw-lines span {\n  display: block;\n  width: calc(var(--n) * 1ch);\n  overflow: hidden;\n  white-space: nowrap;\n  border-right: 0.12em solid transparent;\n}\n\n.tw-lines span:first-child {\n  --n: 14;\n  animation:\n    tw-lines-type 1.4s steps(14) both,\n    tw-lines-blink 0.7s step-end 2;\n}\n\n.tw-lines span:last-child {\n  --n: 12;\n  animation:\n    tw-lines-type 1.2s 1.6s steps(12) both,\n    tw-lines-blink 0.8s 1.4s step-end infinite;\n}\n\n@keyframes tw-lines-type {\n  from { width: 0; }\n}\n\n@keyframes tw-lines-blink {\n  from { border-right-color: currentColor; }\n  50% { border-right-color: transparent; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .tw-lines span { animation: none; }\n}",
  "features": [
    "keyframe animations",
    "custom properties",
    "reduced-motion support"
  ],
  "customProperties": [
    {
      "name": "--n",
      "value": "14"
    }
  ]
}
