Write HTML. Render video. Built for agents.
JavaScript aiai-agentsanimationclaude-codeffmpegframeworkgsaphtmlhtml-to-videomcpmotion-graphicspuppeteerrenderingtypescriptvideo-editor
{"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>Typing Indicator</title>\n <script src=\"https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js\"></script>\n <style>\n html,\n body {\n margin: 0;\n width: 1920px;\n height: 1080px;\n overflow: hidden;\n }\n body {\n background: #101413;\n font-family:\n ui-sans-serif,\n -apple-system,\n \"Segoe UI\",\n sans-serif;\n }\n .hf-ui-demo-canvas {\n position: relative;\n width: 1920px;\n height: 1080px;\n overflow: hidden;\n background:\n radial-gradient(\n ellipse 70% 90% at 26% 30%,\n rgba(60, 230, 172, 0.07) 0%,\n rgba(60, 230, 172, 0) 60%\n ),\n linear-gradient(160deg, #1a201d 0%, #121614 55%, #0e1210 100%);\n }\n /* the device */\n .spec-phone {\n position: absolute;\n left: 430px;\n top: 158px;\n width: 438px;\n height: 764px;\n border-radius: 64px;\n background: #3a3d42;\n box-shadow:\n inset 0 2px 3px rgba(255, 255, 255, 0.22),\n 0 34px 80px rgba(0, 0, 0, 0.55);\n }\n .spec-screen {\n position: absolute;\n left: 14px;\n top: 14px;\n width: 410px;\n height: 736px;\n border-radius: 52px;\n overflow: hidden;\n background: #000;\n }\n /* interior is authored at 1080x1920 and scaled into the screen */\n .spec-int {\n position: absolute;\n left: 0;\n top: 0;\n width: 1080px;\n height: 1920px;\n transform: scale(0.3796);\n transform-origin: 0 0;\n }\n /* the caption column */\n .spec-cap {\n position: absolute;\n left: 1010px;\n top: 300px;\n width: 730px;\n }\n .spec-cap .name {\n font:\n 600 46px/1.1 ui-monospace,\n \"SF Mono\",\n Menlo,\n monospace;\n color: #3ce6ac;\n letter-spacing: -0.5px;\n }\n .spec-cap .rule {\n width: 84px;\n height: 3px;\n background: #3ce6ac;\n margin: 26px 0;\n }\n .spec-cap .desc {\n font:\n 400 21px/1.6 ui-sans-serif,\n -apple-system,\n sans-serif;\n color: #b9c2bd;\n max-width: 620px;\n }\n .spec-cap .stats {\n margin-top: 30px;\n display: grid;\n gap: 12px;\n }\n .spec-cap .stat {\n font:\n 500 16px/1.5 ui-monospace,\n \"SF Mono\",\n Menlo,\n monospace;\n color: #78827d;\n }\n .spec-cap .stat b {\n color: #e8ece9;\n font-weight: 600;\n }\n\n .ti-screen {\n position: absolute;\n inset: 0;\n background: #000;\n }\n .ti-name {\n position: absolute;\n left: 0;\n top: 120px;\n width: 1080px;\n text-align: center;\n }\n .ti-name .av {\n display: inline-grid;\n place-items: center;\n width: 96px;\n height: 96px;\n border-radius: 50%;\n background: #9ce474;\n color: #12300c;\n font-size: 48px;\n font-weight: 600;\n }\n .ti-name .nm {\n display: block;\n margin-top: 12px;\n font-size: 30px;\n color: #8e8e93;\n }\n .ti-item {\n position: absolute;\n left: 44px;\n }\n .ti-bubble {\n display: inline-block;\n max-width: 720px;\n padding: 22px 30px;\n border-radius: 40px;\n font-size: 34px;\n line-height: 1.3;\n color: #fff;\n }\n .ti-recv {\n background: #242428;\n }\n .ti-sent {\n background: #0a80f8;\n }\n .ti-sent-item {\n left: auto;\n right: 45px;\n text-align: right;\n }\n .dotswrap {\n position: relative;\n display: inline-block;\n }\n .dotsbubble {\n width: 124px;\n height: 67px;\n background: #242428;\n border-radius: 34px;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n }\n .dot {\n width: 17px;\n height: 17px;\n border-radius: 50%;\n background: #8e8e93;\n }\n .dtail1 {\n position: absolute;\n left: -2px;\n bottom: -4px;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: #242428;\n }\n .pop {\n display: inline-block;\n transform-origin: left bottom;\n }\n .pop-sent {\n transform-origin: right bottom;\n }\n </style>\n </head>\n <body>\n <div\n id=\"hf-ti-demo-root\"\n class=\"hf-ui-demo-canvas\"\n data-composition-id=\"typing-indicator-demo\"\n data-start=\"0\"\n data-width=\"1920\"\n data-height=\"1080\"\n data-duration=\"4.5\"\n data-composition-variables='[\n { \"id\": \"size\", \"type\": \"number\", \"role\": \"style\", \"label\": \"Size\", \"description\": \"Bubble width in pixels; dots and tail scale with it.\", \"default\": 124, \"min\": 80, \"max\": 220, \"step\": 2, \"unit\": \"px\" },\n { \"id\": \"tone\", \"type\": \"enum\", \"role\": \"style\", \"label\": \"Tone\", \"description\": \"Dark is the reference iOS bubble; light suits bright chat grounds.\", \"default\": \"dark\", \"options\": [{ \"value\": \"dark\", \"label\": \"Dark\" }, { \"value\": \"light\", \"label\": \"Light\" }] },\n { \"id\": \"tail\", \"type\": \"enum\", \"role\": \"style\", \"label\": \"Tail\", \"description\": \"The two shrinking circles anchoring the bubble to the sender side.\", \"default\": \"on\", \"options\": [{ \"value\": \"on\", \"label\": \"On\" }, { \"value\": \"off\", \"label\": \"Off\" }] }\n ]'\n >\n <section\n class=\"clip\"\n data-start=\"0\"\n data-duration=\"4.5\"\n data-track-index=\"1\"\n style=\"position: absolute; inset: 0\"\n >\n <div class=\"spec-phone\">\n <div class=\"spec-screen\">\n <div class=\"spec-int\">\n <div class=\"ti-screen\"></div>\n <div class=\"ti-name\"><span class=\"av\">R</span><span class=\"nm\">Rachel</span></div>\n <div class=\"ti-item\" id=\"ti-m1\" style=\"top: 1080px\">\n <div class=\"pop\">\n <div class=\"ti-bubble ti-recv\">what r u using for the launch video??</div>\n </div>\n </div>\n <div class=\"ti-item\" id=\"ti-dots\" style=\"top: 1230px\">\n <div class=\"pop\" id=\"ti-dots-pop\">\n <div class=\"dotswrap\">\n <div class=\"dotsbubble\">\n <span class=\"dot\"></span><span class=\"dot\"></span><span class=\"dot\"></span>\n </div>\n <div class=\"dtail1\"></div>\n </div>\n </div>\n </div>\n <div class=\"ti-item ti-sent-item\" id=\"ti-m2\" style=\"top: 1230px; left: auto\">\n <div class=\"pop pop-sent\">\n <div class=\"ti-bubble ti-sent\">hyperframes 👀</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"spec-cap\">\n <div class=\"name\">typing-indicator</div>\n <div class=\"rule\"></div>\n <div class=\"desc\">\n The three-dot bubble that says someone is writing: it pops in at the thread's edge,\n holds while the reply is coming, and yields the moment the message lands.\n </div>\n <div class=\"stats\">\n <div class=\"stat\"><b>0.10s</b> — pop-in, scale 0.6 to 1, measured</div>\n <div class=\"stat\"><b>alpha .4 to 1</b> — the measured entry ramp</div>\n <div class=\"stat\"><b>bounded wave</b> — optional; the reference holds still</div>\n </div>\n </div>\n </section>\n </div>\n\n <script>\n (function () {\n \"use strict\";\n\n var vars =\n window.__hyperframes && window.__hyperframes.getVariables\n ? window.__hyperframes.getVariables()\n : {};\n\n // Unrecognised overrides return to their declared defaults.\n function pick(table, value, fallback) {\n return Object.prototype.hasOwnProperty.call(table, value) ? value : fallback;\n }\n\n function clampNumber(value, min, max, fallback) {\n var n = typeof value === \"number\" ? value : parseFloat(value);\n if (!isFinite(n)) {\n return fallback;\n }\n return Math.min(max, Math.max(min, n));\n }\n\n var tones = {\n dark: { surface: \"#242428\", dot: \"#8e8e93\" },\n light: { surface: \"#e9e9eb\", dot: \"#8e8e93\" },\n };\n var tails = { on: \"block\", off: \"none\" };\n\n var size = clampNumber(vars.size, 80, 220, 124);\n var tone = tones[pick(tones, vars.tone, \"dark\")];\n var tail = tails[pick(tails, vars.tail, \"on\")];\n\n var roots = document.querySelectorAll(\".hf-ui-typing-indicator\");\n for (var i = 0; i < roots.length; i += 1) {\n roots[i].style.setProperty(\"--hf-ti-size\", size + \"px\");\n roots[i].style.setProperty(\"--hf-ti-surface\", tone.surface);\n roots[i].style.setProperty(\"--hf-ti-dot\", tone.dot);\n roots[i].style.setProperty(\"--hf-ti-tail\", tail);\n }\n })();\n </script>\n <script>\n window.__timelines = window.__timelines || {};\n var tl = gsap.timeline({ paused: true });\n tl.set([\"#ti-dots\", \"#ti-m2\"], { autoAlpha: 0 }, 0.001);\n /* pop-in exactly as measured */\n tl.set(\"#ti-dots\", { autoAlpha: 1 }, 0.7);\n tl.fromTo(\n \"#ti-dots-pop\",\n { scale: 0.6, autoAlpha: 0.4 },\n { scale: 1, autoAlpha: 1, duration: 0.1, ease: \"power2.out\" },\n 0.7,\n );\n /* bounded dot wave while the reply is coming */\n gsap.utils.toArray(\"#ti-dots .dot\").forEach(function (dot, i) {\n tl.to(\n dot,\n { y: -9, duration: 0.28, ease: \"sine.inOut\", yoyo: true, repeat: 5 },\n 0.85 + i * 0.14,\n );\n });\n /* the message lands: indicator out, bubble pops on the same beat */\n tl.set(\"#ti-dots\", { autoAlpha: 0 }, 2.9);\n tl.set(\"#ti-m2\", { autoAlpha: 1 }, 2.9);\n tl.fromTo(\n \"#ti-m2 .pop\",\n { scale: 0.75, autoAlpha: 0.6 },\n { scale: 1, autoAlpha: 1, duration: 0.12, ease: \"power2.out\" },\n 2.9,\n );\n tl.set({}, {}, 4.5);\n window.__timelines[\"typing-indicator-demo\"] = tl;\n </script>\n <style>\n /* hf-ui:tokens:start */\n /* prettier-ignore */\n [data-hf-ui-root] {\n --_hf-ui-accent: var(--hf-ui-accent, #3ce6ac);\n --_hf-ui-action: var(--hf-ui-action, #eeeeee);\n --_hf-ui-action-contrast: var(--hf-ui-action-contrast, #111111);\n --_hf-ui-border: var(--hf-ui-border, #2a2a2a);\n --_hf-ui-border-strong: var(--hf-ui-border-strong, #383838);\n --_hf-ui-canvas: var(--hf-ui-canvas, #0a0a0a);\n --_hf-ui-control-border: var(--hf-ui-control-border, #686868);\n --_hf-ui-control-border-hover: var(--hf-ui-control-border-hover, #777777);\n --_hf-ui-control-height: var(--hf-ui-control-height, 40px);\n --_hf-ui-danger: var(--hf-ui-danger, #ff7878);\n --_hf-ui-data-1: var(--hf-ui-data-1, #3ce6ac);\n --_hf-ui-data-2: var(--hf-ui-data-2, #63a5ff);\n --_hf-ui-data-3: var(--hf-ui-data-3, #e9ab55);\n --_hf-ui-data-4: var(--hf-ui-data-4, #a78bfa);\n --_hf-ui-data-5: var(--hf-ui-data-5, #ff8a75);\n --_hf-ui-duration-drawer-enter: var(--hf-ui-duration-drawer-enter, 360ms);\n --_hf-ui-duration-drawer-exit: var(--hf-ui-duration-drawer-exit, 240ms);\n --_hf-ui-duration-modal-enter: var(--hf-ui-duration-modal-enter, 280ms);\n --_hf-ui-duration-modal-exit: var(--hf-ui-duration-modal-exit, 180ms);\n --_hf-ui-duration-overlay-enter: var(--hf-ui-duration-overlay-enter, 210ms);\n --_hf-ui-duration-overlay-exit: var(--hf-ui-duration-overlay-exit, 140ms);\n --_hf-ui-duration-press: var(--hf-ui-duration-press, 120ms);\n --_hf-ui-duration-state: var(--hf-ui-duration-state, 160ms);\n --_hf-ui-ease-enter: var(--hf-ui-ease-enter, cubic-bezier(0.32, 0.72, 0, 1));\n --_hf-ui-ease-exit: var(--hf-ui-ease-exit, cubic-bezier(0.23, 1, 0.32, 1));\n --_hf-ui-ease-response: var(--hf-ui-ease-response, cubic-bezier(0.23, 1, 0.32, 1));\n --_hf-ui-font-mono: var(--hf-ui-font-mono, ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace);\n --_hf-ui-font-sans: var(--hf-ui-font-sans, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif);\n --_hf-ui-hit-target: var(--hf-ui-hit-target, 44px);\n --_hf-ui-radius-control: var(--hf-ui-radius-control, 5px);\n --_hf-ui-radius-overlay: var(--hf-ui-radius-overlay, 10px);\n --_hf-ui-radius-surface: var(--hf-ui-radius-surface, 7px);\n --_hf-ui-shadow-contact: var(--hf-ui-shadow-contact, 0 8px 18px rgba(0, 0, 0, 0.38));\n --_hf-ui-shadow-inset: var(--hf-ui-shadow-inset, inset 0 1px 0 rgba(255, 255, 255, 0.035));\n --_hf-ui-shadow-modal: var(--hf-ui-shadow-modal, 0 18px 46px rgba(0, 0, 0, 0.52));\n --_hf-ui-space-1: var(--hf-ui-space-1, 4px);\n --_hf-ui-space-12: var(--hf-ui-space-12, 48px);\n --_hf-ui-space-16: var(--hf-ui-space-16, 64px);\n --_hf-ui-space-2: var(--hf-ui-space-2, 8px);\n --_hf-ui-space-3: var(--hf-ui-space-3, 12px);\n --_hf-ui-space-4: var(--hf-ui-space-4, 16px);\n --_hf-ui-space-6: var(--hf-ui-space-6, 24px);\n --_hf-ui-space-8: var(--hf-ui-space-8, 32px);\n --_hf-ui-surface: var(--hf-ui-surface, #141414);\n --_hf-ui-surface-inset: var(--hf-ui-surface-inset, #101010);\n --_hf-ui-surface-raised: var(--hf-ui-surface-raised, #1a1a1a);\n --_hf-ui-text: var(--hf-ui-text, #e5e5e5);\n --_hf-ui-text-faint: var(--hf-ui-text-faint, #7e7e7e);\n --_hf-ui-text-muted: var(--hf-ui-text-muted, #929292);\n --_hf-ui-text-strong: var(--hf-ui-text-strong, #f3f3f3);\n --_hf-ui-warning: var(--hf-ui-warning, #e9ab55);\n --_hf-ui-weight-medium: var(--hf-ui-weight-medium, 500);\n --_hf-ui-weight-regular: var(--hf-ui-weight-regular, 400);\n --_hf-ui-weight-semibold: var(--hf-ui-weight-semibold, 600);\n box-sizing: border-box;\n color-scheme: dark;\n font-family: var(--_hf-ui-font-sans);\n }\n /* prettier-ignore */\n [data-hf-ui-root] *,\n [data-hf-ui-root] *::before,\n [data-hf-ui-root] *::after {\n box-sizing: border-box;\n }\n /* prettier-ignore */\n [data-hf-theme=\"light\"] [data-hf-ui-root],\n [data-hf-ui-root][data-hf-theme=\"light\"] {\n --_hf-ui-accent: var(--hf-ui-accent, #087a57);\n --_hf-ui-action: var(--hf-ui-action, #171717);\n --_hf-ui-action-contrast: var(--hf-ui-action-contrast, #ffffff);\n --_hf-ui-border: var(--hf-ui-border, #e0dfdb);\n --_hf-ui-border-strong: var(--hf-ui-border-strong, #cbc9c3);\n --_hf-ui-canvas: var(--hf-ui-canvas, #f6f5f1);\n --_hf-ui-control-border: var(--hf-ui-control-border, #888888);\n --_hf-ui-control-border-hover: var(--hf-ui-control-border-hover, #6f6e68);\n --_hf-ui-danger: var(--hf-ui-danger, #a61b1b);\n --_hf-ui-data-1: var(--hf-ui-data-1, #087a57);\n --_hf-ui-data-2: var(--hf-ui-data-2, #245ea8);\n --_hf-ui-data-3: var(--hf-ui-data-3, #8a4b00);\n --_hf-ui-data-4: var(--hf-ui-data-4, #6d3fc0);\n --_hf-ui-data-5: var(--hf-ui-data-5, #a83d2d);\n --_hf-ui-shadow-contact: var(--hf-ui-shadow-contact, 0 7px 16px rgba(26, 24, 20, 0.13));\n --_hf-ui-shadow-inset: var(--hf-ui-shadow-inset, inset 0 1px 0 rgba(255, 255, 255, 0.78));\n --_hf-ui-shadow-modal: var(--hf-ui-shadow-modal, 0 18px 46px rgba(26, 24, 20, 0.18));\n --_hf-ui-surface: var(--hf-ui-surface, #ffffff);\n --_hf-ui-surface-inset: var(--hf-ui-surface-inset, #f0efeb);\n --_hf-ui-surface-raised: var(--hf-ui-surface-raised, #ffffff);\n --_hf-ui-text: var(--hf-ui-text, #171717);\n --_hf-ui-text-faint: var(--hf-ui-text-faint, #6f6e68);\n --_hf-ui-text-muted: var(--hf-ui-text-muted, #5f5f5a);\n --_hf-ui-text-strong: var(--hf-ui-text-strong, #0a0a0a);\n --_hf-ui-warning: var(--hf-ui-warning, #8a4b00);\n color-scheme: light;\n }\n /* prettier-ignore */\n [data-hf-ui-root]:focus-visible {\n outline: 2px solid var(--_hf-ui-accent);\n outline-offset: 3px;\n }\n /* prettier-ignore */\n [data-hf-rendering=\"true\"][data-hf-ui-root],\n [data-hf-rendering=\"true\"] [data-hf-ui-root],\n [data-hf-rendering=\"true\"][data-hf-ui-root] *,\n [data-hf-rendering=\"true\"] [data-hf-ui-root] *,\n [data-hf-rendering=\"true\"][data-hf-ui-root]::before,\n [data-hf-rendering=\"true\"][data-hf-ui-root]::after,\n [data-hf-rendering=\"true\"] [data-hf-ui-root]::before,\n [data-hf-rendering=\"true\"] [data-hf-ui-root]::after,\n [data-hf-rendering=\"true\"][data-hf-ui-root] *::before,\n [data-hf-rendering=\"true\"][data-hf-ui-root] *::after,\n [data-hf-rendering=\"true\"] [data-hf-ui-root] *::before,\n [data-hf-rendering=\"true\"] [data-hf-ui-root] *::after {\n animation-duration: 0s !important;\n animation-delay: 0s !important;\n transition-duration: 0s !important;\n transition-delay: 0s !important;\n }\n /* prettier-ignore */\n @media (prefers-reduced-motion: reduce) {\n [data-hf-ui-root],\n [data-hf-ui-root] *,\n [data-hf-ui-root] *::before,\n [data-hf-ui-root] *::after {\n animation-duration: 0s !important;\n animation-delay: 0s !important;\n transition-duration: 0s !important;\n transition-delay: 0s !important;\n scroll-behavior: auto !important;\n }\n }\n /* hf-ui:tokens:end */\n\n .hf-ui-typing-indicator {\n position: relative;\n display: inline-block;\n }\n .hf-ti-wrap {\n position: relative;\n display: inline-block;\n font-size: var(--hf-ti-size, 124px);\n will-change: opacity, transform;\n }\n .hf-ti-bubble {\n width: 1em;\n height: 0.54em;\n background: var(--hf-ti-surface, #242428);\n border-radius: 0.274em;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.081em;\n }\n .hf-ti-dot {\n width: 0.137em;\n height: 0.137em;\n border-radius: 50%;\n background: var(--hf-ti-dot, #8e8e93);\n display: inline-block;\n }\n .hf-ti-tail1 {\n position: absolute;\n left: -0.016em;\n bottom: -0.032em;\n width: 0.145em;\n height: 0.145em;\n border-radius: 50%;\n background: var(--hf-ti-surface, #242428);\n display: var(--hf-ti-tail, block);\n }\n .hf-ti-tail2 {\n position: absolute;\n left: -0.113em;\n bottom: -0.113em;\n width: 0.073em;\n height: 0.073em;\n border-radius: 50%;\n background: var(--hf-ti-surface, #242428);\n display: var(--hf-ti-tail, block);\n }\n </style>\n </body>\n</html>\n"}