Files
hyperframes/docs/catalog/components/animated-bar-chart.mdx
T
Ular Kimsanov a06fdfe26e docs(catalog): put each item page's title, description and Docs text in the server HTML (#6711)
* 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.
2026-10-30 15:48:25 +00:00

163 lines
4.6 KiB
Plaintext

---
title: "Animated Bar Chart"
description: "A compact data card with deterministic bar growth and value callouts."
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>Animated Bar Chart</h1>
<p>A compact data card with deterministic bar growth and value callouts.</p>
</div>
<CatalogDetail
previewSrc="/public/catalog/components/animated-bar-chart.json"
compositionId="animated-bar-chart"
compositionSrc="compositions/components/animated-bar-chart.html"
title="Animated Bar Chart"
variables={[]}
meta={{"category":"Data","badge":"Stable","codeLines":98}}
attribution={{"path":"registry/components/animated-bar-chart","tags":["data"]}}
hasCode
rawUrl="https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry/components/animated-bar-chart/animated-bar-chart.html"
>
<CatalogSlot slot="code">
```html animated-bar-chart.html
<!--
Animated Bar Chart - catalog component for HyperFrames.
Paste the markup and CSS into a composition. Drive the timeline integration
from a paused GSAP timeline so renders remain deterministic.
-->
<div class="hf-catalog-animated-bar-chart">
<header>
<div>
<h3>Animated Bar Chart</h3>
<p>A compact data card with deterministic bar growth and value callouts.</p>
</div>
<strong>+42%</strong>
</header>
<div class="bars">
<span class="bar" style="--h: 42%"></span><span class="bar" style="--h: 72%"></span
><span class="bar" style="--h: 56%"></span><span class="bar" style="--h: 88%"></span
><span class="bar" style="--h: 64%"></span><span class="bar" style="--h: 95%"></span
><span class="bar" style="--h: 78%"></span>
</div>
<svg viewBox="0 0 700 210">
<path
d="M20 172 C120 90, 190 118, 260 74 S430 112, 508 42 S620 82, 680 30"
fill="none"
stroke="currentColor"
stroke-width="10"
stroke-linecap="round"
/>
</svg>
</div>
<style>
.hf-catalog-animated-bar-chart {
--hf-accent: var(--accent, #111827);
--hf-ink: #111827;
--hf-l1: rgba(17, 24, 39, 0.72);
--hf-l2: rgba(17, 24, 39, 0.45);
--hf-l3: rgba(17, 24, 39, 0.18);
--hf-l4: rgba(17, 24, 39, 0.08);
--hf-hair: rgba(17, 24, 39, 0.14);
--hf-muted: #6b7280;
--hf-surface: #ffffff;
color: var(--hf-ink);
font-family: Inter, system-ui, sans-serif;
}
.hf-catalog-animated-bar-chart {
width: 760px;
min-height: 420px;
border-radius: 28px;
background: #fff;
padding: 34px;
box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16);
display: grid;
gap: 22px;
}
.hf-catalog-animated-bar-chart header {
display: flex;
justify-content: space-between;
align-items: end;
}
.hf-catalog-animated-bar-chart h3 {
margin: 0;
font-size: 34px;
letter-spacing: -0.04em;
}
.hf-catalog-animated-bar-chart strong {
font-size: 54px;
letter-spacing: -0.06em;
}
.hf-catalog-animated-bar-chart .bars {
height: 210px;
display: grid;
grid-template-columns: repeat(7, 1fr);
align-items: end;
gap: 14px;
}
.hf-catalog-animated-bar-chart .bar {
height: calc(var(--h) * var(--hf-grow, 1));
border-radius: 14px 14px 5px 5px;
background: var(--hf-l1);
}
.hf-catalog-animated-bar-chart svg {
width: 100%;
height: 210px;
overflow: visible;
}
.hf-catalog-animated-bar-chart path {
color: var(--hf-l2);
stroke-dasharray: 900;
stroke-dashoffset: var(--hf-dash, 0);
}
</style>
<!--
Timeline integration:
tl.fromTo('.hf-catalog-animated-bar-chart', { '--hf-grow': 0, '--hf-dash': 900 }, { '--hf-grow': 1, '--hf-dash': 0, duration: 1.2, ease: 'power3.out' }, startTime);
-->
```
</CatalogSlot>
<CatalogSlot slot="install">
<InstallCommand command="npx hyperframes add animated-bar-chart" item="animated-bar-chart" />
That writes one file: `compositions/components/animated-bar-chart.html`.
</CatalogSlot>
</CatalogDetail>
<div data-static-slot="docs" className="prose prose-gray dark:prose-invert">
## Paste it into your composition
Open `compositions/components/animated-bar-chart.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 `data`.
## 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>