> ## 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.

# Pull Back Reveal

> A tight stat detail holds, then one decelerating camera pull-back reveals the headline and supporting cards that recontextualize it.

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="pull-back-reveal 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/pull-back-reveal.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/pull-back-reveal.png");document.body.appendChild(p)});<\/script></body></html>`} />

## Install

<InstallCommand command="npx hyperframes add pull-back-reveal" />

That writes one file: `compositions/components/pull-back-reveal.html`.

## Paste it into your composition

Open `compositions/components/pull-back-reveal.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                                               |
| ------------- | ------------------ | ------------------------- | ---------------------------------------------------------- |
| `detail_text` | `+312%`            | string                    | Stat shown in the detail chip at the center of the reveal. |
| `headline`    | `Growth compounds` | string                    | Headline revealed around the focused detail.               |
| `accent`      | `green`            | `green`, `blue`, `violet` | Highlight color used across the composed scene.            |

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="pull-back-reveal"
  data-composition-src="compositions/components/pull-back-reveal.html"
  data-variable-values='{"detail_text":"+312%","headline":"Growth compounds","accent":"green"}'
></div>
```

## Source

<Accordion title={`pull-back-reveal.html`}>
  ```html theme={null}
  <!doctype html>
  <!--
    pull-back-reveal: HyperFrames video primitive (camera / reveal / recontextualize)

    Concept: the frame starts tight on one stat chip, pauses long enough to
    establish it as the subject, then pulls back to reveal the headline and two
    supporting cards that give the stat its meaning. The chip remains the same
    DOM element for the entire move.

    Variables:
      - detail_text (string, default "+312%"): the stat inside the focus chip.
      - headline (string, default "Growth compounds"): the scene headline.
      - accent (green | blue | violet, default "green"): the scene highlight.

    Envelope (fixed IN, elastic HOLD, no OUT, never gsap.timeScale()):
      IN_BASE  = 2.40s  tight hold, whip-out pull-back, then a short drift settle
      HOLD     = elastic full-scene hold with a restrained shadow breath
      OUT_BASE = 0s     the reveal establishes the final composed scene
      If D is shorter than IN_BASE, the three IN beats compress together and
      HOLD becomes zero. Longer mounts stretch HOLD only.

    Mount contract: the runtime clones only this template. #root fills the host
    box, establishes the container query basis, has no data-width or data-height,
    and registers one paused timeline under the hardcoded pull-back-reveal id.
  -->
  <html
    lang="en"
    data-composition-id="pull-back-reveal"
    data-composition-duration="4.5"
    data-composition-variables='[
      { "id": "detail_text", "type": "string", "role": "content", "label": "Detail text", "description": "Stat shown in the detail chip at the center of the reveal.", "default": "+312%" },
      { "id": "headline", "type": "string", "role": "content", "label": "Headline", "description": "Headline revealed around the focused detail.", "default": "Growth compounds" },
      { "id": "accent", "type": "enum", "role": "style", "label": "Accent", "description": "Highlight color used across the composed scene.", "default": "green", "options": [{ "value": "green", "label": "Green" }, { "value": "blue", "label": "Blue" }, { "value": "violet", "label": "Violet" }] }
    ]'
  >
    <head>
      <meta charset="UTF-8" />
      <title>Pull Back Reveal</title>
    </head>
    <body>
      <template>
        <div id="root" data-composition-id="pull-back-reveal" data-duration="4.5" data-fps="30">
          <style>
            *,
            *::before,
            *::after {
              box-sizing: border-box;
            }

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

            .pbr-clip,
            .pbr-world {
              position: absolute;
              inset: 0;
            }

            .pbr-clip {
              overflow: hidden;
              background: var(--bg, #0b0c0e);
            }

            .pbr-world {
              overflow: hidden;
              transform-origin: 50% 50%;
              background:
                radial-gradient(
                  circle at 48% 50%,
                  color-mix(in srgb, var(--pbr-accent) 19%, transparent),
                  transparent 27%
                ),
                linear-gradient(
                  145deg,
                  color-mix(in srgb, var(--surface, #18202d) 82%, var(--bg, #0b0c0e)),
                  var(--bg, #0b0c0e) 72%
                );
              will-change: transform;
            }

            .pbr-headline {
              position: absolute;
              z-index: 1;
              top: 8cqh;
              left: 8cqw;
              width: 76cqw;
              color: var(--fg, #f8fafc);
              font-family: var(--font-display, Inter, system-ui, sans-serif);
              font-size: 7.6cqw;
              font-weight: 780;
              line-height: 0.92;
              letter-spacing: -0.055em;
              overflow-wrap: anywhere;
              text-shadow: 0 1.8cqh 5cqh color-mix(in srgb, var(--bg, #0b0c0e) 72%, transparent);
            }

            .pbr-card {
              position: absolute;
              z-index: 1;
              overflow: hidden;
              border: 0.11cqw solid color-mix(in srgb, var(--border, #334155) 78%, transparent);
              border-radius: var(--radius, 2.4cqw);
              background: color-mix(in srgb, var(--surface, #1e293b) 92%, transparent);
              box-shadow:
                0 2.2cqh 5.5cqh color-mix(in srgb, var(--bg, #0b0c0e) 54%, transparent),
                inset 0 0.1cqh 0 color-mix(in srgb, var(--fg, #f8fafc) 9%, transparent);
            }

            .pbr-detail-card {
              top: 31cqh;
              left: 8cqw;
              width: 56cqw;
              height: 56cqh;
              padding: 5cqh 4cqw;
            }

            .pbr-detail-label,
            .pbr-support-label {
              color: var(--muted, #94a3b8);
              font-size: 1.35cqw;
              font-weight: 680;
              line-height: 1;
              letter-spacing: 0.1em;
              text-transform: uppercase;
            }

            .pbr-detail-chip {
              position: absolute;
              top: 13cqh;
              left: 31cqw;
              width: 20cqw;
              min-height: 12cqh;
              display: grid;
              place-items: center;
              padding: 1.8cqh 1.5cqw;
              border: 0.12cqw solid color-mix(in srgb, var(--pbr-accent) 72%, var(--fg, #f8fafc));
              border-radius: calc(var(--radius, 2.4cqw) * 0.72);
              background: color-mix(in srgb, var(--pbr-accent) 22%, var(--surface, #1e293b));
              box-shadow: 0 1.8cqh 4.5cqh color-mix(in srgb, var(--pbr-accent) 28%, transparent);
              color: var(--fg, #f8fafc);
              font-family: var(--font-display, Inter, system-ui, sans-serif);
              font-size: 4.4cqw;
              font-weight: 820;
              line-height: 1;
              letter-spacing: -0.055em;
              overflow: hidden;
              text-align: center;
              text-overflow: ellipsis;
              white-space: nowrap;
            }

            .pbr-detail-context {
              position: absolute;
              bottom: 5cqh;
              left: 4cqw;
              color: var(--muted, #94a3b8);
              font-size: 1.6cqw;
              font-weight: 560;
              line-height: 1.25;
            }

            .pbr-support-card {
              left: 75cqw;
              width: 17cqw;
              height: 25cqh;
              padding: 3.6cqh 2.2cqw;
              display: flex;
              flex-direction: column;
              justify-content: space-between;
            }

            .pbr-support-card-a {
              top: 31cqh;
            }

            .pbr-support-card-b {
              top: 62cqh;
            }

            .pbr-support-value {
              color: var(--fg, #f8fafc);
              font-family: var(--font-display, Inter, system-ui, sans-serif);
              font-size: 3.7cqw;
              font-weight: 780;
              line-height: 0.9;
              letter-spacing: -0.05em;
            }

            .pbr-support-rule {
              width: 100%;
              height: 0.5cqh;
              border-radius: 999cqw;
              background: color-mix(in srgb, var(--pbr-accent) 72%, var(--border, #334155));
            }

            .pbr-ground {
              position: absolute;
              z-index: 0;
              left: 15cqw;
              bottom: 2cqh;
              width: 70cqw;
              height: 10cqh;
              border-radius: 50%;
              background: color-mix(in srgb, var(--pbr-accent) 16%, var(--bg, #0b0c0e));
              filter: blur(3.2cqh);
              opacity: 0;
              transform-origin: 50% 50%;
              will-change: transform, opacity;
            }
          </style>

          <div
            id="pull-back-reveal-clip"
            class="pbr-clip clip"
            data-start="0"
            data-duration="4.5"
            data-track-index="0"
          >
            <div class="pbr-world">
              <div class="pbr-headline"></div>

              <section class="pbr-card pbr-detail-card">
                <div class="pbr-detail-label">Net growth</div>
                <div class="pbr-detail-chip"></div>
                <div class="pbr-detail-context">Across every active workspace</div>
              </section>

              <section class="pbr-card pbr-support-card pbr-support-card-a">
                <div class="pbr-support-label">Retention</div>
                <div class="pbr-support-value">94%</div>
                <div class="pbr-support-rule"></div>
              </section>

              <section class="pbr-card pbr-support-card pbr-support-card-b">
                <div class="pbr-support-label">Teams</div>
                <div class="pbr-support-value">48</div>
                <div class="pbr-support-rule"></div>
              </section>

              <div class="pbr-ground"></div>
            </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 world = root.querySelector(".pbr-world");
              var headline = root.querySelector(".pbr-headline");
              var detail = root.querySelector(".pbr-detail-chip");
              var ground = root.querySelector(".pbr-ground");
              var vars =
                window.__hyperframes && window.__hyperframes.getVariables
                  ? window.__hyperframes.getVariables()
                  : {};

              var detailText = vars.detail_text == null ? "+312%" : String(vars.detail_text);
              var headlineText = vars.headline == null ? "Growth compounds" : String(vars.headline);
              var accentColors = {
                green: "var(--brand, #a1a1aa)",
                blue: "var(--accent, #a1a1aa)",
                violet: "var(--accent-2, #a1a1aa)",
              };
              var accentColor = accentColors[vars.accent] || accentColors.green;

              detail.textContent = detailText;
              headline.textContent = headlineText;
              root.style.setProperty("--pbr-accent", accentColor);

              // RETIME RANGE: IN owns the tight beat and complete camera move.
              // HOLD is the only elastic phase. This reveal has no exit.
              var IN_BASE = 2.4;
              var TIGHT_HOLD_BASE = 0.55;
              var WHIP_BASE = 1.2;
              var DRIFT_BASE = 0.65;
              var duration = Math.max(0.001, parseFloat(root.dataset.duration || "4.5"));
              var phaseScale = Math.min(1, duration / IN_BASE);
              var TIGHT_HOLD = TIGHT_HOLD_BASE * phaseScale;
              var WHIP = WHIP_BASE * phaseScale;
              var DRIFT = DRIFT_BASE * phaseScale;
              var IN = TIGHT_HOLD + WHIP + DRIFT;
              var HOLD = Math.max(0, duration - IN);

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

              tl.fromTo(
                world,
                { scale: 2.2, y: 0 },
                { scale: 1.055, y: "0.7cqh", duration: WHIP, ease: "power4.out" },
                TIGHT_HOLD,
              );
              tl.to(
                world,
                { scale: 1, y: 0, duration: DRIFT, ease: "sine.inOut" },
                TIGHT_HOLD + WHIP,
              );
              tl.fromTo(
                ground,
                { opacity: 0, scaleX: 0.72, scaleY: 0.72 },
                { opacity: 0.78, scaleX: 1, scaleY: 1, duration: DRIFT, ease: "power2.out" },
                TIGHT_HOLD + WHIP,
              );

              if (HOLD > 0) {
                tl.to(
                  ground,
                  { opacity: 0.68, scaleX: 0.97, duration: HOLD * 0.5, ease: "sine.inOut" },
                  IN,
                );
                tl.to(
                  ground,
                  { opacity: 0.78, scaleX: 1, duration: HOLD * 0.5, ease: "sine.inOut" },
                  IN + HOLD * 0.5,
                );
              }

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

Tagged `motion-primitive` `camera` `pull-back` `reveal` `recontextualize`.

## 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

- [Pull to Refresh](/catalog/components/pull-to-refresh.md)
- [Turn a pull request into a video](/guides/pr-to-video.md)
- [Skeleton Reveal](/catalog/components/skeleton-reveal.md)
