mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 16:08:56 +00:00
* docs(catalog): put each item page's title, description and Docs text in the server HTML Mintlify renders snippet components in the browser only, so everything inside CatalogDetail (title, standfirst, the Docs tab) was missing from the HTML search engines read: 448 catalog pages served Googlebot no body text. The generator now writes the H1 and standfirst as page markup above the component and the Docs tab as page markup after it, shown with that tab (docs/custom.css). The component no longer draws its own title. Pages patched structurally only; registry drift on 14 pages is left for a regeneration of its own. * docs(catalog): keep the title's top spacing the component gave it * fix(docs): catalog titles and descriptions keep markdown markers literal MDX reads text inside the static <h1> and <p> as inline markdown, so @_blue_sweater_ rendered as italic blue_sweater. mdxText now writes backslash, backtick, * _ [ ] ~ as character references too, with a unit test; the four affected pages are re-escaped.
131 lines
3.8 KiB
Plaintext
131 lines
3.8 KiB
Plaintext
---
|
|
title: "Shimmer Sweep"
|
|
description: "Animated light sweep across text or elements using a CSS gradient mask — ideal for AI accents and premium reveals"
|
|
mode: "frame"
|
|
---
|
|
|
|
import { CatalogDetail, CatalogSlot } from "/snippets/catalog-detail.jsx";
|
|
import { InstallCommand } from "/snippets/install-command.jsx";
|
|
|
|
<div className="hf-ve-static-head not-prose">
|
|
<h1>Shimmer Sweep</h1>
|
|
<p>Animated light sweep across text or elements using a CSS gradient mask — ideal for AI accents and premium reveals</p>
|
|
</div>
|
|
|
|
<CatalogDetail
|
|
previewSrc="/public/catalog/components/shimmer-sweep.json"
|
|
compositionId="shimmer-sweep"
|
|
compositionSrc="compositions/components/shimmer-sweep.html"
|
|
title="Shimmer Sweep"
|
|
variables={[]}
|
|
meta={{"category":"Typography & Text","badge":"Stable","codeLines":66}}
|
|
attribution={{"path":"registry/components/shimmer-sweep","tags":["text","shimmer","highlight","effect"]}}
|
|
hasCode
|
|
rawUrl="https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry/components/shimmer-sweep/shimmer-sweep.html"
|
|
>
|
|
|
|
<CatalogSlot slot="code">
|
|
|
|
```html shimmer-sweep.html
|
|
<!--
|
|
Shimmer Sweep — animated light pass across text or elements.
|
|
|
|
Usage: place this snippet AFTER your .shimmer-sweep-target elements.
|
|
Wrap your text element with class="shimmer-sweep-target" and
|
|
paste this snippet into your composition. The GSAP timeline drives
|
|
the sweep position for deterministic frame-by-frame rendering.
|
|
|
|
Customize:
|
|
- --shimmer-color: highlight color (default rgba(255,255,255,0.6))
|
|
- --shimmer-width: highlight band width as % (default 20%)
|
|
- --shimmer-angle: sweep angle (default 120deg)
|
|
- Timeline duration/ease: adjust in the script below
|
|
-->
|
|
|
|
<style>
|
|
.shimmer-sweep-target {
|
|
position: relative;
|
|
display: inline-block;
|
|
}
|
|
|
|
.shimmer-sweep-target .shimmer-mask {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
pointer-events: none;
|
|
background: linear-gradient(
|
|
var(--shimmer-angle, 120deg),
|
|
transparent 0%,
|
|
transparent calc(var(--shimmer-pos, -20%) - var(--shimmer-width, 20%) / 2),
|
|
var(--shimmer-color, rgba(255, 255, 255, 0.6)) var(--shimmer-pos, -20%),
|
|
transparent calc(var(--shimmer-pos, -20%) + var(--shimmer-width, 20%) / 2),
|
|
transparent 100%
|
|
);
|
|
mix-blend-mode: overlay;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
(function () {
|
|
// Auto-inject .shimmer-mask into every .shimmer-sweep-target
|
|
document.querySelectorAll(".shimmer-sweep-target").forEach((el) => {
|
|
if (!el.querySelector(".shimmer-mask")) {
|
|
const mask = document.createElement("div");
|
|
mask.className = "shimmer-mask";
|
|
el.appendChild(mask);
|
|
}
|
|
});
|
|
})();
|
|
</script>
|
|
|
|
<!--
|
|
Timeline integration example (add to your composition's GSAP timeline):
|
|
|
|
// Single sweep from left to right
|
|
tl.fromTo(".shimmer-sweep-target", {
|
|
"--shimmer-pos": "-20%",
|
|
}, {
|
|
"--shimmer-pos": "120%",
|
|
duration: 1.2,
|
|
ease: "power2.inOut",
|
|
stagger: 0.15,
|
|
}, startTime);
|
|
-->
|
|
```
|
|
|
|
</CatalogSlot>
|
|
|
|
<CatalogSlot slot="install">
|
|
|
|
<InstallCommand command="npx hyperframes add shimmer-sweep" item="shimmer-sweep" />
|
|
|
|
That writes one file: `compositions/components/shimmer-sweep.html`.
|
|
|
|
</CatalogSlot>
|
|
|
|
</CatalogDetail>
|
|
|
|
<div data-static-slot="docs" className="prose prose-gray dark:prose-invert">
|
|
|
|
## Paste it into your composition
|
|
|
|
Open `compositions/components/shimmer-sweep.html` and copy what is inside into your own composition.
|
|
The file opens with a comment header that walks you through it.
|
|
|
|
A component has no size or duration of its own. It takes both from the composition
|
|
you paste it into.
|
|
|
|
{/* hf:generated-footer */}
|
|
|
|
Tagged `text` `shimmer` `highlight` `effect`.
|
|
|
|
## Related topics
|
|
|
|
- [Browse the complete Catalog](/catalog)
|
|
- [Add assets and Catalog items in the browser editor](/studio/assets-and-blocks)
|
|
- [Put blocks together into one video](/concepts/compositions)
|
|
|
|
</div>
|