{
  "id": "glitch-text",
  "name": "Glitch Text",
  "category": "text",
  "tags": [
    "glitch",
    "cyberpunk",
    "clip-path",
    "animation",
    "dark"
  ],
  "description": "A cyberpunk glitch effect with offset red and cyan slices.",
  "url": "https://copy-css.com/snippets/glitch-text",
  "markdown": "https://copy-css.com/snippets/glitch-text.md",
  "html": "<h2 class=\"glitch\" data-text=\"GLITCH\">GLITCH</h2>",
  "css": ".glitch {\n  position: relative;\n  margin: 0;\n  color: #fff;\n  font: 900 52px/1 system-ui, sans-serif;\n  letter-spacing: 0.04em;\n}\n\n.glitch::before,\n.glitch::after {\n  content: attr(data-text);\n  position: absolute;\n  top: 0;\n  width: 100%;\n  background: #0f0f12; /* match your page background */\n}\n\n.glitch::before {\n  left: 2px;\n  text-shadow: -2px 0 #f43f5e;\n  animation: glitch-a 2.5s infinite linear alternate-reverse;\n}\n\n.glitch::after {\n  left: -2px;\n  text-shadow: 2px 0 #22d3ee;\n  animation: glitch-b 3s infinite linear alternate-reverse;\n}\n\n@keyframes glitch-a {\n  0% { clip-path: inset(10% 0 80% 0); }\n  20% { clip-path: inset(60% 0 20% 0); }\n  40% { clip-path: inset(30% 0 50% 0); }\n  60% { clip-path: inset(80% 0 5% 0); }\n  80% { clip-path: inset(15% 0 70% 0); }\n  100% { clip-path: inset(45% 0 40% 0); }\n}\n\n@keyframes glitch-b {\n  0% { clip-path: inset(70% 0 10% 0); }\n  25% { clip-path: inset(20% 0 65% 0); }\n  50% { clip-path: inset(50% 0 30% 0); }\n  75% { clip-path: inset(5% 0 85% 0); }\n  100% { clip-path: inset(85% 0 2% 0); }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .glitch::before,\n  .glitch::after {\n    display: none;\n  }\n}",
  "features": [
    "keyframe animations",
    "text shadows",
    "clip paths",
    "reduced-motion support"
  ],
  "customProperties": []
}
