Loading...
Loading...
HyperFrames HTML composition contract. Use for composition structure, data attributes, clips, tracks, sub-compositions, variables, media playback, deterministic render rules, and validation of minimal renderable projects.
npx skill4agent add heygen-com/hyperframes hyperframes-coredata-*hyperframes-animationhyperframes-creativehyperframes-mediahyperframes-registryhyperframes addhyperframes-clihyperframes init --tailwindreferences/tailwind.md| Want to… | Read |
|---|---|
| See a minimal renderable composition | |
| Decide between monolithic single-file and modular sub-comp architecture | |
Structure a modular | |
| Pick a sub-comp archetype (content / driver-only / multi-scene merge / audio-reactive) | |
Look up a | |
Use | |
Pick a | |
Time a clip relative to another ( | |
Wire a sub-composition (host attributes, | |
Animate inside a sub-composition ( | |
Declare variables (types, extra options, defaults, | |
Place | |
Build a seekable timeline (paused, sync construction, | |
Avoid non-deterministic state (clocks, | |
Know what can / cannot be animated (visual-property allowlist; not | |
Fit text and prevent overflow ( | |
| Author full-frame motion with shared backgrounds | |
Work in a Tailwind v4 project ( | |
hyperframes-animationadapters/<runtime>.mdindex.html<div data-composition-id="…"><body><template><template>data-composition-src<div data-composition-id="…"><template>⚠ Sub-composition transport rule: the runtime only clonescontents into the live DOM. Everything outside the template — including<template>and any<head>/<style>/<script>that lives in<link>— is discarded. Put<head>and<style>blocks inside<script>, not in<template>.<head>⚠ Host-id rule: in the host file,on the slot must exactly equal the inner template'sdata-composition-idand thedata-composition-idkey. Do not addwindow.__timelines["<id>"]/-mount/-slotsuffixes.-host
references/sub-compositions.mdheight: 100%height:100%lintvalidateinspectinspectdata-widthdata-height<body style="margin: 0">
<div
id="root"
data-composition-id="main"
data-width="1920"
data-height="1080"
data-duration="5"
style="position: relative; width: 1920px; height: 1080px; overflow: hidden"
>
<!-- Center robustly: position:absolute + inset:0 fills the sized root regardless of
intermediate wrappers; or use a flex container ONLY if its parent chain is sized. -->
<section
class="clip"
data-start="0"
data-duration="5"
data-track-index="1"
style="position: absolute; inset: 0; display: grid; place-items: center; padding: 120px 160px; box-sizing: border-box"
>
<h1>Title</h1>
</section>
</div>
</body>paddingreferences/minimal-composition.mdgsap.timeline({ paused: true })window.__timelines["<composition-id>"]data-composition-idwindow.__timelines.<id> = tl-asyncsetTimeoutPromisedata-durationmaster.add(sub)hyperframes-animation/adapters/<runtime>.mdreferences/determinism-rules.mdlintvalidateinspectMath.random()Date.now()performance.now()repeat: -1repeat: Math.max(0, Math.floor(duration / cycleDuration) - 1)floorceilceildata-durationgsap_repeat_ceil_overshootmax(0, …)<video><audio>index.html<template><div>video.play()audio.play()currentTime = …querySelectorreferences/variables-and-media.mdgsap.set()tl.set(selector, vars, time)data-startdisplayvisibilityopacity<br>max-widthtransformscaleXscaleY<span>display: blockinline-blockwidthheightwidth: 100%yoyoback.outoverflow: hiddendata-track-indexdata-composition-idhyperframes-clinpx hyperframes lintnpx hyperframes validatenpx hyperframes inspectnpx hyperframes snapshot --at <midpoints>