Skip to content

Write HTML. Render video. Built for agents.

2.8 KB
Raw Blame
{
  "$schema": "https://hyperframes.heygen.com/schema/registry-item.json",
  "name": "line-swap",
  "type": "hyperframes:component",
  "title": "Line Swap",
  "description": "A masked full-line beat replacement: line A holds center then exits up through an overflow-hidden mask as line B enters bottom-up on the same beat, with an optional accent underline drawing beneath one word of line B.",
  "tags": ["motion-primitive", "text-effects", "swap", "beat", "deterministic"],
  "jobs": ["emphasize"],
  "family": "text-effects",
  "profile": "beat-swap",
  "evidence": "Wave J2-5: generalizes flagship frame 01, the overflow-hidden mask slot with a single restrained beat replacement and a scaleX underline draw",
  "syncPoints": [{ "id": "line-swap-beat", "phase": "in", "offset": 1.5 }],
  "files": [
    {
      "path": "line-swap.html",
      "target": "compositions/components/line-swap.html",
      "type": "hyperframes:snippet"
    }
  ],
  "variables": [
    {
      "id": "line_a",
      "type": "string",
      "role": "content",
      "label": "Line A",
      "description": "First line; holds center inside the mask, then exits up on the swap beat.",
      "default": "Everyone promised you AI."
    },
    {
      "id": "line_b",
      "type": "string",
      "role": "content",
      "label": "Line B",
      "description": "Replacement line; enters bottom-up on the swap beat and holds.",
      "default": "Almost nobody promised you control."
    },
    {
      "id": "swap_at",
      "type": "number",
      "role": "timing",
      "label": "Swap at",
      "description": "Second (from mount start) of the beat replacement. Clamped so the swap and underline complete before any exit.",
      "default": 1.5,
      "min": 0,
      "step": 0.1,
      "unit": "s"
    },
    {
      "id": "underline_word",
      "type": "string",
      "role": "content",
      "label": "Underline word",
      "description": "First case-insensitive substring match in line B gets the accent underline after landing. Empty disables it.",
      "default": "control"
    },
    {
      "id": "accent",
      "type": "enum",
      "role": "style",
      "label": "Accent",
      "description": "Underline color from the contract token map.",
      "default": "green",
      "options": [
        { "value": "green", "label": "Green" },
        { "value": "blue", "label": "Blue" },
        { "value": "violet", "label": "Violet" }
      ]
    },
    {
      "id": "exit",
      "type": "enum",
      "role": "timing",
      "label": "Exit",
      "description": "Optional departure. Default none: the landed line holds until the frame cuts.",
      "default": "none",
      "options": [
        { "value": "none", "label": "None" },
        { "value": "fade", "label": "Fade" },
        { "value": "up", "label": "Up" }
      ]
    }
  ]
}