mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-14 13:27:13 +00:00
Improve all 169 component demo previews for catalog legibility and polish: - replace jagged clip-path cursor with a crisp SVG pointer (context-menu, cursor, simulated-cursor) - scale under-sized UI primitives to fill the frame; enrich sparse demos with context (sibling rows, skeleton content, profile cards) - normalize toward a neutral zinc/stone palette, bump small type, tidy spacing/radius/shadows - preserve GSAP timelines, data-* composition attrs, and determinism
104 lines
2.7 KiB
HTML
Vendored
104 lines
2.7 KiB
HTML
Vendored
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=1920, height=1080" />
|
|
<title>Chart - Demo</title>
|
|
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
|
<style>
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
html,
|
|
body {
|
|
margin: 0;
|
|
width: 1920px;
|
|
height: 1080px;
|
|
overflow: hidden;
|
|
}
|
|
#demo {
|
|
width: 1920px;
|
|
height: 1080px;
|
|
display: grid;
|
|
place-items: center;
|
|
background: #f7f7f8;
|
|
font-family: Inter, system-ui, sans-serif;
|
|
}
|
|
.demo-frame {
|
|
display: grid;
|
|
place-items: center;
|
|
min-width: 760px;
|
|
min-height: 480px;
|
|
padding: 56px;
|
|
/* ponytail: zoom scales the wrapper; GSAP animates .hf-ui-chart so no transform conflict */
|
|
zoom: 1.51;
|
|
}
|
|
.hf-ui-chart {
|
|
display: grid;
|
|
gap: 20px;
|
|
width: 400px;
|
|
padding: 28px;
|
|
border: 1px solid #e4e4e7;
|
|
border-radius: 16px;
|
|
background: #fff;
|
|
box-shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
|
|
color: #18181b;
|
|
font-family: Inter, system-ui, sans-serif;
|
|
}
|
|
.hf-ui-chart div {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
align-items: end;
|
|
gap: 14px;
|
|
height: 180px;
|
|
}
|
|
.hf-ui-chart span {
|
|
display: block;
|
|
height: calc(var(--h) * var(--hf-chart-progress, 1) * 100%);
|
|
border-radius: 10px 10px 4px 4px;
|
|
background: linear-gradient(180deg, #38bdf8, #2563eb);
|
|
}
|
|
.hf-ui-chart figcaption {
|
|
margin: 0;
|
|
color: #71717a;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
letter-spacing: -0.01em;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div
|
|
id="demo"
|
|
data-composition-id="chart-demo"
|
|
data-start="0"
|
|
data-width="1920"
|
|
data-height="1080"
|
|
data-duration="5"
|
|
>
|
|
<div class="demo-frame">
|
|
<figure class="hf-ui-chart">
|
|
<div>
|
|
<span style="--h: 0.42"></span><span style="--h: 0.7"></span
|
|
><span style="--h: 0.55"></span><span style="--h: 0.88"></span>
|
|
</div>
|
|
<figcaption>Weekly usage</figcaption>
|
|
</figure>
|
|
</div>
|
|
<script>
|
|
const tl = gsap.timeline({ paused: true });
|
|
const startTime = 0.45;
|
|
tl.fromTo(
|
|
".hf-ui-chart",
|
|
{ "--hf-chart-progress": 0 },
|
|
{ "--hf-chart-progress": 1, duration: 0.72, ease: "power2.out" },
|
|
startTime,
|
|
);
|
|
tl.set({}, {}, 5);
|
|
window.__timelines = window.__timelines || {};
|
|
window.__timelines["chart-demo"] = tl;
|
|
</script>
|
|
</div>
|
|
</body>
|
|
</html>
|