> ## Documentation Index
> Fetch the complete documentation index at: https://hyperframes.heygen.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CTA Lockup

> A canonical closing lockup that reveals an action line, pops in an accent CTA capsule, settles supporting microcopy, and holds with confidence.

export const InstallCommand = ({command}) => {
  const [copied, setCopied] = React.useState(false);
  const copy = async () => {
    try {
      if (navigator.clipboard && window.isSecureContext) {
        await navigator.clipboard.writeText(command);
      } else {
        const previous = document.activeElement;
        const scratch = document.createElement("textarea");
        scratch.value = command;
        scratch.setAttribute("readonly", "");
        scratch.style.position = "fixed";
        scratch.style.opacity = "0";
        document.body.appendChild(scratch);
        scratch.select();
        document.execCommand("copy");
        document.body.removeChild(scratch);
        previous?.focus?.();
      }
      setCopied(true);
      setTimeout(() => setCopied(false), 2000);
    } catch {}
  };
  return <div className="hf-install-command not-prose my-4 flex items-stretch overflow-hidden rounded-xl border border-zinc-200 bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900">
      <code className="flex-1 overflow-x-auto whitespace-nowrap border-r border-zinc-200 px-4 py-3 font-mono text-sm text-zinc-800 dark:border-zinc-800 dark:text-zinc-100">
        {command}
      </code>
      <button type="button" onClick={copy} data-copied={copied ? "true" : "false"} aria-label={`Copy ${command} to the clipboard`} className="hf-install-copy">
        <svg className="hf-install-copy-clipboard" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 18 18" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
          <path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" />
          <path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" />
        </svg>
        <svg className="hf-install-copy-check" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 18 18" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
          <path d="M2.75 9.5L6.5 13.25L15.25 4.5" />
        </svg>
      </button>
      <span className="hf-install-copy-status" role="status" aria-live="polite">
        {copied ? "Copied" : ""}
      </span>
    </div>;
};

<iframe className="w-full aspect-video rounded-xl border-0 bg-zinc-100 dark:bg-zinc-800" title="cta-lockup preview" loading="lazy" srcDoc={`<!doctype html><html><head><meta charset="utf-8"><style>html,body{margin:0;height:100%;overflow:hidden;background:transparent}hyperframes-player{display:block;width:100%;height:100%}</style><script src="https://cdn.jsdelivr.net/npm/@hyperframes/player@0.7/dist/hyperframes-player.global.js"><\/script></head><body><script>fetch("/public/catalog/components/cta-lockup.json").then(function(r){return r.json()}).then(function(d){var p=document.createElement("hyperframes-player");p.setAttribute("srcdoc",d.html);p.setAttribute("controls","");p.setAttribute("autoplay","");p.setAttribute("loop","");p.setAttribute("muted","");p.setAttribute("poster","https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/cta-lockup.png");document.body.appendChild(p)});<\/script></body></html>`} />

## Install

<InstallCommand command="npx hyperframes add cta-lockup" />

That writes one file: `compositions/components/cta-lockup.html`.

## Paste it into your composition

Open `compositions/components/cta-lockup.html` and copy what is inside into your own composition.

A component has no size or duration of its own. It takes both from the composition
you paste it into.

## Variables

Every one of these has a default, so the piece works untouched. Set the ones you
want to change on the element:

| Variable       | Default                | Accepts                   | What it does                                   |
| -------------- | ---------------------- | ------------------------- | ---------------------------------------------- |
| `action_line`  | `Start building today` | string                    | Primary action statement shown above the CTA.  |
| `button_label` | `Get HyperFrames`      | string                    | Text displayed inside the CTA capsule.         |
| `microcopy`    | `Free while in beta`   | string                    | Supporting detail shown below the CTA capsule. |
| `accent`       | `green`                | `green`, `blue`, `violet` | Fill color used by the CTA capsule.            |

Set them with `data-variable-values` on the element that mounts it. These are the
defaults, so this behaves exactly like the preview above until you change one:

```html wrap theme={null}
<div
  data-composition-id="cta-lockup"
  data-composition-src="compositions/components/cta-lockup.html"
  data-variable-values='{"action_line":"Start building today","button_label":"Get HyperFrames","microcopy":"Free while in beta","accent":"green"}'
></div>
```

## Source

<Accordion title={`cta-lockup.html`}>
  ```html theme={null}
  <!doctype html>
  <!--
    cta-lockup: HyperFrames video primitive (ui-props / holdable / ask)

    Concept: a canonical closing lockup with one frozen reveal order. The
    action line arrives first, the CTA capsule pops beneath it with a restrained
    overshoot second, and supporting microcopy settles last. The completed
    lockup then holds with confidence.

    Use when: a product film, launch video, or explainer needs one clear final
    action without adding a second visual idea.

    Variables:
      - action_line (string, default "Start building today"): primary close.
      - button_label (string, default "Get HyperFrames"): CTA capsule label.
      - microcopy (string, default "Free while in beta"): supporting detail.
      - accent (green | blue | violet, default green): capsule fill.

    Envelope:
      IN   1.60s fixed, action line then capsule then microcopy.
      HOLD elastic, with one nearly imperceptible drift cycle across the full
           remaining duration so longer mounts stretch only this phase.
      OUT  none. This closing lockup establishes the final held state.
      If D is shorter than 1.60s, IN compresses to fit and HOLD becomes zero.

    Mount contract: this file is a template-wrapped sub-composition. #root
    fills the host box, establishes the container query basis, carries no
    data-width or data-height, and registers one paused GSAP timeline under
    the hardcoded literal id "cta-lockup".
  -->
  <html
    lang="en"
    data-composition-id="cta-lockup"
    data-composition-duration="4"
    data-composition-variables='[
      { "id": "action_line", "type": "string", "role": "content", "label": "Action line", "description": "Primary action statement shown above the CTA.", "default": "Start building today" },
      { "id": "button_label", "type": "string", "role": "content", "label": "Button label", "description": "Text displayed inside the CTA capsule.", "default": "Get HyperFrames" },
      { "id": "microcopy", "type": "string", "role": "content", "label": "Microcopy", "description": "Supporting detail shown below the CTA capsule.", "default": "Free while in beta" },
      { "id": "accent", "type": "enum", "role": "style", "label": "Accent", "description": "Fill color used by the CTA capsule.", "default": "green", "options": [{ "value": "green", "label": "Green" }, { "value": "blue", "label": "Blue" }, { "value": "violet", "label": "Violet" }] }
    ]'
  >
    <head>
      <meta charset="UTF-8" />
      <title>CTA Lockup</title>
    </head>
    <body>
      <template>
        <div id="root" data-composition-id="cta-lockup" data-duration="4" data-fps="30">
          <style>
            *,
            *::before,
            *::after {
              box-sizing: border-box;
            }

            #root {
              position: absolute;
              inset: 0;
              overflow: hidden;
              container-type: size;
              isolation: isolate;
              color: var(--fg, #f8fafc);
              font-family: var(--font-body, Inter, system-ui, sans-serif);
              pointer-events: none;
            }

            .cl-clip {
              width: 100%;
              height: 100%;
              display: grid;
              place-items: center;
              overflow: hidden;
            }

            .cl-lockup {
              width: min(88cqw, 150cqh);
              display: flex;
              flex-direction: column;
              align-items: center;
              text-align: center;
              will-change: transform;
            }

            .cl-action {
              max-width: 86cqw;
              margin: 0 0 6.5cqh;
              color: var(--fg, #f8fafc);
              font-family: var(--font-display, Inter, system-ui, sans-serif);
              font-size: min(10cqw, 14cqh);
              font-weight: 760;
              line-height: 1.02;
              letter-spacing: -0.045em;
              text-wrap: balance;
              will-change: transform, opacity;
            }

            .cl-button {
              min-width: 34cqw;
              max-width: 78cqw;
              margin: 0 0 3.8cqh;
              padding: 3.2cqh 5.5cqw;
              overflow: hidden;
              border: 0;
              border-radius: 50cqh;
              background: var(--cl-accent, #22c55e);
              box-shadow: 0 2.2cqh 6cqh color-mix(in srgb, var(--cl-accent, #22c55e) 28%, transparent);
              color: #07110d;
              font: inherit;
              font-size: min(4.3cqw, 6.8cqh);
              font-weight: 760;
              line-height: 1;
              letter-spacing: -0.02em;
              text-overflow: ellipsis;
              white-space: nowrap;
              transform-origin: 50% 50%;
              will-change: transform, opacity;
            }

            .cl-microcopy {
              max-width: 76cqw;
              margin: 0;
              color: var(--muted, #cbd5e1);
              font-size: min(3cqw, 4.2cqh);
              font-weight: 520;
              line-height: 1.25;
              letter-spacing: 0.01em;
              text-wrap: balance;
              will-change: transform, opacity;
            }
          </style>

          <div
            id="cta-lockup-clip"
            class="cl-clip clip"
            data-start="0"
            data-duration="4"
            data-track-index="0"
          >
            <div class="cl-lockup">
              <h2 class="cl-action"></h2>
              <button class="cl-button" type="button" tabindex="-1"></button>
              <p class="cl-microcopy"></p>
            </div>
          </div>

          <script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
          <script>
            (function () {
              "use strict";

              var root = document.getElementById("root");
              var lockup = root.querySelector(".cl-lockup");
              var actionLine = root.querySelector(".cl-action");
              var button = root.querySelector(".cl-button");
              var microcopy = root.querySelector(".cl-microcopy");
              var vars =
                window.__hyperframes && window.__hyperframes.getVariables
                  ? window.__hyperframes.getVariables()
                  : {};

              var actionText =
                vars.action_line == null ? "Start building today" : String(vars.action_line);
              var buttonText =
                vars.button_label == null ? "Get HyperFrames" : String(vars.button_label);
              var microcopyText =
                vars.microcopy == null ? "Free while in beta" : String(vars.microcopy);
              var accentColors = {
                green: "var(--brand, #22c55e)",
                blue: "var(--accent, #38bdf8)",
                violet: "var(--accent-2, #a78bfa)",
              };
              var accentName = Object.prototype.hasOwnProperty.call(accentColors, vars.accent)
                ? vars.accent
                : "green";

              actionLine.textContent = actionText;
              button.textContent = buttonText;
              microcopy.textContent = microcopyText;
              root.style.setProperty("--cl-accent", accentColors[accentName]);

              var IN_BASE = 1.6;
              var duration = Math.max(0.001, parseFloat(root.dataset.duration || "4"));
              var envelopeScale = Math.min(1, duration / IN_BASE);
              var IN = IN_BASE * envelopeScale;
              var HOLD = Math.max(0, duration - IN);

              var ACTION_DURATION = 0.5 * envelopeScale;
              var BUTTON_AT = 0.56 * envelopeScale;
              var BUTTON_DURATION = 0.6 * envelopeScale;
              var BUTTON_OPACITY_DURATION = 0.24 * envelopeScale;
              var MICROCOPY_AT = 1.18 * envelopeScale;
              var MICROCOPY_DURATION = 0.42 * envelopeScale;

              var tl = gsap.timeline({ paused: true });

              tl.fromTo(
                actionLine,
                { opacity: 0, y: "3.4cqh" },
                { opacity: 1, y: 0, duration: ACTION_DURATION, ease: "power3.out" },
                0,
              );
              tl.fromTo(
                button,
                { scale: 0.72, y: "2.2cqh" },
                {
                  scale: 1,
                  y: 0,
                  duration: BUTTON_DURATION,
                  ease: "back.out(1.7)",
                },
                BUTTON_AT,
              );
              tl.fromTo(
                button,
                { opacity: 0 },
                {
                  opacity: 1,
                  duration: BUTTON_OPACITY_DURATION,
                  ease: "power2.out",
                },
                BUTTON_AT,
              );
              tl.fromTo(
                microcopy,
                { opacity: 0, y: "1.8cqh" },
                {
                  opacity: 1,
                  y: 0,
                  duration: MICROCOPY_DURATION,
                  ease: "power2.out",
                },
                MICROCOPY_AT,
              );

              if (HOLD > 0) {
                tl.fromTo(
                  lockup,
                  { y: 0 },
                  {
                    y: "-0.35cqh",
                    duration: HOLD / 2,
                    ease: "sine.inOut",
                    yoyo: true,
                    repeat: 1,
                  },
                  IN,
                );
              }

              tl.seek(0);
              window.__timelines = window.__timelines || {};
              window.__timelines["cta-lockup"] = tl;
            })();
          </script>
        </div>
      </template>
    </body>
  </html>
  ```
</Accordion>

Tagged `motion-primitive` `ui-props` `cta` `end-card` `lockup` `ask`.

## Related topics

* [Browse the complete Catalog](/catalog)
* [Add assets and Catalog items in Studio](/studio/assets-and-blocks)
* [Build a richer composition](/go-further)


## Related topics

- [Design systems and brand](/prompting/design-systems.md)
- [Capstone — every technique, one journey](/prompting/capstone.md)
- [CTA Close](/catalog/components/cta-close.md)
