{
  "id": "rotating-words",
  "name": "Rotating Words",
  "category": "text",
  "tags": [
    "rotate",
    "words",
    "headline",
    "animation",
    "hero"
  ],
  "description": "A headline where one word cycles through options. Pure CSS, no JavaScript.",
  "url": "https://copy-css.com/snippets/rotating-words",
  "markdown": "https://copy-css.com/snippets/rotating-words.md",
  "html": "<p class=\"rotator\">Build <span><b>faster</b><b>better</b><b>bolder</b></span></p>",
  "css": ".rotator {\n  display: flex;\n  gap: 0.3em;\n  margin: 0;\n  color: #111;\n  font: 700 32px/1.2 system-ui, sans-serif;\n}\n\n.rotator span {\n  display: inline-flex;\n  flex-direction: column;\n  height: 1.2em;\n  overflow: hidden;\n}\n\n.rotator b {\n  color: #7c3aed;\n  animation: rotate-words 6s infinite;\n}\n\n@keyframes rotate-words {\n  0%, 28% { transform: translateY(0); }\n  33%, 61% { transform: translateY(-100%); }\n  66%, 94% { transform: translateY(-200%); }\n  100% { transform: translateY(0); }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .rotator b {\n    animation: none;\n  }\n}",
  "features": [
    "keyframe animations",
    "transforms",
    "Flexbox",
    "reduced-motion support"
  ],
  "customProperties": []
}
