Files
hyperframes/docs/public/catalog/components/rgb-glitch-text.json
T

1 line
3.2 KiB
JSON

{"html":"<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=1920, height=1080\" />\n <title>RGB Glitch Text - Demo</title>\n <script src=\"https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js\"></script>\n <style>\n * {\n box-sizing: border-box;\n }\n html,\n body {\n margin: 0;\n width: 1920px;\n height: 1080px;\n overflow: hidden;\n }\n #demo {\n width: 1920px;\n height: 1080px;\n display: grid;\n place-items: center;\n background: #09090b;\n font-family: Inter, system-ui, sans-serif;\n }\n .demo-frame {\n display: grid;\n place-items: center;\n gap: 32px;\n padding: 64px;\n zoom: 0.28;\n }\n /* ponytail: scale-up via font-size — GSAP only touches CSS vars, not transform */\n .hf-catalog-rgb-glitch-text {\n color: #fafafa;\n font-family: Inter, system-ui, sans-serif;\n font-weight: 900;\n letter-spacing: -0.04em;\n }\n .hf-catalog-rgb-glitch-text {\n position: relative;\n width: 1120px;\n height: 200px;\n font-size: 192px;\n line-height: 1;\n }\n .hf-catalog-rgb-glitch-text span,\n .hf-catalog-rgb-glitch-text strong {\n position: absolute;\n inset: 0;\n }\n .hf-catalog-rgb-glitch-text span:first-child {\n color: #ef4444;\n mix-blend-mode: screen;\n transform: translateX(var(--hf-glitch-red, 0px));\n }\n .hf-catalog-rgb-glitch-text span:nth-child(2) {\n color: #22d3ee;\n mix-blend-mode: screen;\n transform: translateX(var(--hf-glitch-blue, 0px));\n }\n .hf-catalog-rgb-glitch-text strong {\n color: #fafafa;\n }\n .demo-label {\n font-size: 24px;\n font-weight: 500;\n color: #52525b;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n }\n </style>\n </head>\n <body>\n <div\n id=\"demo\"\n data-composition-id=\"rgb-glitch-text-demo\"\n data-start=\"0\"\n data-width=\"1920\"\n data-height=\"1080\"\n data-duration=\"5\"\n >\n <div class=\"demo-frame\">\n <div class=\"hf-catalog-rgb-glitch-text\">\n <span>GLITCH</span><span>GLITCH</span><strong>GLITCH</strong>\n </div>\n <div class=\"demo-label\">RGB Glitch Text</div>\n </div>\n <script>\n const tl = gsap.timeline({ paused: true });\n const startTime = 0.5;\n tl.to(\".hf-catalog-rgb-glitch-text\", { opacity: 1, duration: 0.01 }, startTime);\n tl.to(\n \".hf-catalog-rgb-glitch-text\",\n {\n \"--hf-glitch-red\": \"-20px\",\n \"--hf-glitch-blue\": \"20px\",\n duration: 0.06,\n repeat: 5,\n yoyo: true,\n ease: \"steps(1)\",\n },\n startTime + 0.1,\n );\n tl.set({}, {}, 5);\n window.__timelines = window.__timelines || {};\n window.__timelines[\"rgb-glitch-text-demo\"] = tl;\n </script>\n </div>\n </body>\n</html>\n"}