Files
hyperframes/docs/catalog/components/logo-sting.mdx
T
Miguel Ángel 9734578e60 feat(registry): bring back the video-primitive moves (#3169)
Restores the 208 catalog items reverted after their previews 404'd in
production, this time on the payload mechanism rather than the .html files
that caused the outage.

The generator no longer writes a preview document to docs/public. That writer,
and the machinery under it, existed only to produce files the docs host
discards, so it is gone rather than bypassed. Items now embed the composition
itself via a payload, which is what the previous change already does for the
items that were already in the catalog.

The variables explorer is parked, not restored: it drove its preview through
the same unpublished .html path, so it would have shown an empty frame. Items
that declare variables get the live player plus the static variables table, and
reconnecting the explorer to payloads is a follow-up.
2026-08-10 18:46:03 -04:00

247 lines
8.7 KiB
Plaintext

---
title: "Logo Sting"
description: "A wordmark slams into its final scale, fires one accent ring and one white impact frame, then holds completely still."
---
import { InstallCommand } from "/snippets/install-command.jsx";
<iframe
className="w-full aspect-video rounded-xl border-0 bg-zinc-100 dark:bg-zinc-800"
title="logo-sting 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/logo-sting.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/logo-sting.png");document.body.appendChild(p)});<\/script></body></html>`}
/>
## Install
<InstallCommand command="npx hyperframes add logo-sting" />
That writes one file: `compositions/components/logo-sting.html`.
## Paste it into your composition
Open `compositions/components/logo-sting.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 |
| --- | --- | --- | --- |
| `wordmark` | `HYPERFRAMES` | string | Brand name displayed in the final lockup. |
| `accent` | `green` | `green`, `blue`, `violet` | Color of the single impact ring. |
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
<div
data-composition-id="logo-sting"
data-composition-src="compositions/components/logo-sting.html"
data-variable-values='{"wordmark":"HYPERFRAMES","accent":"green"}'
></div>
```
## Source
<Accordion title={`logo-sting.html`}>
```html
<!doctype html>
<!--
logo-sting: HyperFrames video primitive (brand / impact / reveal)
Concept: a wordmark lands from scale 1.15 with the slam ease. Its impact
triggers one accent ring and exactly one frame of white, then the finished
lockup holds completely still.
Variables:
- wordmark (string, default "HYPERFRAMES"): the brand name.
- accent (green | blue | violet, default green): the ring color.
Envelope (fixed IN, elastic HOLD, no OUT, never timeScale):
IN_BASE = 0.95s. The wordmark lands at 0.55s, then the ring resolves.
HOLD = max(0, D - IN). This phase is deliberately dead still.
OUT = 0s. The final brand frame remains established through the end.
If D is shorter than IN_BASE, only IN compresses and HOLD becomes zero.
Mount contract: this template is cloned into a sized host. #root fills that
host, establishes the container query basis, and registers one paused GSAP
timeline under the hardcoded logo-sting key.
-->
<html
lang="en"
data-composition-id="logo-sting"
data-composition-duration="2.2"
data-composition-variables='[
{ "id": "wordmark", "type": "string", "role": "content", "label": "Wordmark", "description": "Brand name displayed in the final lockup.", "default": "HYPERFRAMES" },
{ "id": "accent", "type": "enum", "role": "style", "label": "Accent", "description": "Color of the single impact ring.", "default": "green", "options": [{ "value": "green", "label": "Green" }, { "value": "blue", "label": "Blue" }, { "value": "violet", "label": "Violet" }] }
]'
>
<head>
<meta charset="UTF-8" />
<title>Logo Sting</title>
</head>
<body>
<template>
<div id="root" data-composition-id="logo-sting" data-duration="2.2" data-fps="30">
<style>
*,
*::before,
*::after {
box-sizing: border-box;
}
#root {
position: absolute;
inset: 0;
overflow: hidden;
container-type: size;
background: var(--bg, #0b0c0e);
color: var(--fg, #f8fafc);
font-family: var(--font-display, Inter, system-ui, sans-serif);
pointer-events: none;
}
.ls-clip {
position: absolute;
inset: 0;
display: grid;
place-items: center;
overflow: hidden;
}
.ls-ring {
position: absolute;
z-index: 1;
width: min(42cqw, 72cqh);
aspect-ratio: 1;
border: min(0.34cqw, 0.62cqh) solid var(--ls-accent);
border-radius: 50%;
opacity: 0;
will-change: transform, opacity;
}
.ls-wordmark {
position: relative;
z-index: 2;
max-width: 90cqw;
color: var(--fg, #f8fafc);
font-size: min(10.5cqw, 18cqh);
font-weight: 850;
line-height: 0.9;
letter-spacing: -0.055em;
text-align: center;
white-space: nowrap;
transform-origin: 50% 50%;
will-change: transform;
}
.ls-flash {
position: absolute;
inset: 0;
z-index: 3;
background: #ffffff;
opacity: 0;
}
</style>
<div
id="logo-sting-clip"
class="ls-clip clip"
data-start="0"
data-duration="2.2"
data-track-index="0"
>
<div class="ls-ring" aria-hidden="true"></div>
<div class="ls-wordmark"></div>
<div class="ls-flash" aria-hidden="true"></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 wordmark = root.querySelector(".ls-wordmark");
var ring = root.querySelector(".ls-ring");
var flash = root.querySelector(".ls-flash");
var vars =
window.__hyperframes && window.__hyperframes.getVariables
? window.__hyperframes.getVariables()
: {};
var accentColors = {
green: "var(--brand, #5df28b)",
blue: "var(--accent, #4da3ff)",
violet: "var(--accent-2, #a978ff)",
};
var accent = Object.prototype.hasOwnProperty.call(accentColors, vars.accent)
? vars.accent
: "green";
var wordmarkText = vars.wordmark == null ? "HYPERFRAMES" : String(vars.wordmark);
wordmark.textContent = wordmarkText;
root.style.setProperty("--ls-accent", accentColors[accent]);
var IN_BASE = 0.95;
var IMPACT_BASE = 0.55;
var parsedDuration = parseFloat(root.dataset.duration);
var duration = Number.isFinite(parsedDuration) ? Math.max(0.001, parsedDuration) : 2.2;
var IN = Math.min(IN_BASE, duration);
var retime = IN / IN_BASE;
var IMPACT = IMPACT_BASE * retime;
var RING_DURATION = (IN_BASE - IMPACT_BASE) * retime;
var FLASH_FRAME = Math.min(1 / 30, RING_DURATION);
var HOLD = Math.max(0, duration - IN);
gsap.set(ring, { scale: 0.34, opacity: 0 });
gsap.set(flash, { opacity: 0 });
var tl = gsap.timeline({ paused: true });
tl.fromTo(
wordmark,
{ scale: 1.15 },
{ scale: 1, duration: IMPACT, ease: "expo.out" },
0,
);
tl.set(ring, { opacity: 0.92 }, IMPACT);
tl.to(
ring,
{ scale: 2.4, opacity: 0, duration: RING_DURATION, ease: "power3.out" },
IMPACT,
);
tl.set(flash, { opacity: 1 }, IMPACT);
tl.set(flash, { opacity: 0 }, IMPACT + FLASH_FRAME);
tl.addLabel("hold", IN);
tl.addLabel("end", IN + HOLD);
tl.seek(0);
window.__timelines = window.__timelines || {};
window.__timelines["logo-sting"] = tl;
})();
</script>
</div>
</template>
</body>
</html>
```
</Accordion>
{/* hf:generated-footer */}
Tagged `motion-primitive` `brand` `logo` `sting` `impact` `reveal`.
## Related topics
- [Browse the complete Catalog](/catalog)
- [Add assets and Catalog items in Studio](/studio/assets-and-blocks)
- [Build a richer composition](/go-further)