Skip to content

Write HTML. Render video. Built for agents.

4.5 KB
Raw Blame
{"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>X Follow Card - Demo</title>\n    <script src=\"https://cdn.jsdelivr.net/npm/[email protected]/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: #fafafa;\n        font-family: Inter, system-ui, sans-serif;\n      }\n      .demo-frame {\n        display: grid;\n        place-items: center;\n        padding: 52px;\n        /* ponytail: scale wrapper (not a GSAP target) to fill ~65% of 1920px frame */\n        transform: scale(1.9);\n        transform-origin: center center;\n      }\n      .hf-catalog-x-follow-card {\n        --hf-accent: var(--accent, #f8fafc);\n        --hf-ink: #111827;\n        --hf-l1: rgba(255, 255, 255, 0.72);\n        --hf-l2: rgba(255, 255, 255, 0.45);\n        --hf-muted: #6b7280;\n        --hf-surface: #ffffff;\n        color: var(--hf-ink);\n        font-family: Inter, system-ui, sans-serif;\n      }\n      .hf-catalog-x-follow-card {\n        width: 700px;\n        border-radius: 30px;\n        padding: 34px;\n        background: #0f172a;\n        color: #fff;\n        box-shadow: 0 28px 80px rgba(15, 23, 42, 0.2);\n      }\n      .hf-catalog-x-follow-card header {\n        display: flex;\n        align-items: center;\n        gap: 16px;\n      }\n      .hf-catalog-x-follow-card .avatar {\n        width: 70px;\n        height: 70px;\n        border-radius: 22px;\n        background: var(--hf-l1);\n      }\n      .hf-catalog-x-follow-card h3 {\n        margin: 0;\n        font-size: 36px;\n        letter-spacing: -0.04em;\n      }\n      .hf-catalog-x-follow-card p {\n        color: #94a3b8;\n        margin: 4px 0 0;\n        font-size: 18px;\n      }\n      .hf-catalog-x-follow-card .stat {\n        margin-top: 30px;\n        font-size: 82px;\n        font-weight: 900;\n        letter-spacing: -0.08em;\n        transform: translateY(var(--hf-stat-y, 0px));\n      }\n      .hf-catalog-x-follow-card .avatars {\n        display: flex;\n        margin-top: 18px;\n      }\n      .hf-catalog-x-follow-card .avatars span {\n        width: 46px;\n        height: 46px;\n        border-radius: 999px;\n        border: 3px solid #0f172a;\n        margin-left: -10px;\n        background: var(--c);\n        opacity: var(--hf-avatar-opacity, 1);\n        transform: translateY(var(--hf-avatar-y, 0px));\n      }\n    </style>\n  </head>\n  <body>\n    <div\n      id=\"demo\"\n      data-composition-id=\"x-follow-card-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-x-follow-card\">\n          <header>\n            <div class=\"avatar\"></div>\n            <div>\n              <h3>X Follow Card</h3>\n              <p>A social follow card with avatar, handle, and follower motion.</p>\n            </div>\n          </header>\n          <div class=\"stat\">30.6K</div>\n          <div class=\"avatars\">\n            <span style=\"--c: var(--hf-l1)\"></span><span style=\"--c: var(--hf-l2)\"></span\n            ><span style=\"--c: var(--hf-l2)\"></span><span style=\"--c: var(--hf-l2)\"></span\n            ><span style=\"--c: var(--hf-l2)\"></span><span style=\"--c: var(--hf-l2)\"></span>\n          </div>\n        </div>\n      </div>\n      <script>\n        const tl = gsap.timeline({ paused: true });\n        const startTime = 0.5;\n        tl.fromTo(\n          \".hf-catalog-x-follow-card .stat\",\n          { \"--hf-stat-y\": \"28px\", opacity: 0 },\n          { \"--hf-stat-y\": \"0px\", opacity: 1, duration: 0.46, ease: \"back.out(1.6)\" },\n          startTime,\n        );\n        tl.fromTo(\n          \".hf-catalog-x-follow-card .avatars span\",\n          { \"--hf-avatar-y\": \"18px\", \"--hf-avatar-opacity\": 0 },\n          {\n            \"--hf-avatar-y\": \"0px\",\n            \"--hf-avatar-opacity\": 1,\n            duration: 0.28,\n            stagger: 0.05,\n            ease: \"power2.out\",\n          },\n          startTime + 0.22,\n        );\n        tl.set({}, {}, 5);\n        window.__timelines = window.__timelines || {};\n        window.__timelines[\"x-follow-card-demo\"] = tl;\n      </script>\n    </div>\n  </body>\n</html>\n"}