Files
hyperframes/registry/components/button-group/demo.html
T
Miguel Angel Simon Sierra e9172e3331 feat(registry): polish demo previews to shadcn-grade across catalog
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
2026-06-25 00:57:26 -04:00

96 lines
2.6 KiB
HTML
Vendored

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=1920, height=1080" />
<title>Button Group - 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: scale on the non-GSAP wrapper; GSAP only touches the button inside */
transform: scale(3.2);
}
.hf-ui-button-group {
display: inline-flex;
padding: 6px;
border: 1px solid #e4e4e7;
border-radius: 14px;
background: #f4f4f5;
font-family: Inter, system-ui, sans-serif;
box-shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
}
.hf-ui-button-group button {
height: 44px;
padding: 0 22px;
border: 0;
border-radius: 10px;
background: transparent;
color: #52525b;
font-size: 15px;
font-weight: 600;
letter-spacing: -0.01em;
cursor: pointer;
}
.hf-ui-button-group button[aria-pressed="true"] {
background: #18181b;
color: #fff;
box-shadow: 0 10px 24px rgba(24, 24, 27, 0.22);
}
</style>
</head>
<body>
<div
id="demo"
data-composition-id="button-group-demo"
data-start="0"
data-width="1920"
data-height="1080"
data-duration="5"
>
<div class="demo-frame">
<div class="hf-ui-button-group" role="group" aria-label="Export mode">
<button type="button">Draft</button>
<button type="button" aria-pressed="true">Final</button>
<button type="button">Archive</button>
</div>
</div>
<script>
const tl = gsap.timeline({ paused: true });
const startTime = 0.45;
tl.fromTo(
'.hf-ui-button-group button[aria-pressed="true"]',
{ scale: 0.92 },
{ scale: 1, duration: 0.28, ease: "back.out(1.7)" },
startTime,
);
tl.set({}, {}, 5);
window.__timelines = window.__timelines || {};
window.__timelines["button-group-demo"] = tl;
</script>
</div>
</body>
</html>