Files
hyperframes/registry/components/input/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

125 lines
3.4 KiB
HTML
Vendored

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=1920, height=1080" />
<title>Input - 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;
}
.card {
width: 660px;
padding: 54px;
border: 1px solid #e4e4e7;
border-radius: 24px;
background: #fff;
box-shadow: 0 24px 70px rgba(0, 0, 0, 0.1);
/* ponytail: scale-up only — GSAP does not animate .card */
transform: scale(2);
transform-origin: center center;
}
.hf-ui-input-field {
--hf-input-focus: 0;
--hf-input-value-progress: 0;
display: grid;
gap: 12px;
width: 100%;
color: #18181b;
}
.hf-ui-input-label {
font-size: 25px;
font-weight: 850;
}
.hf-ui-input-shell {
position: relative;
display: flex;
align-items: center;
height: 72px;
padding: 0 24px;
border: 2px solid color-mix(in srgb, #18181b calc(var(--hf-input-focus) * 62%), #d4d4d8);
border-radius: 18px;
background: white;
box-shadow: 0 0 0 calc(var(--hf-input-focus) * 7px) rgba(24, 24, 27, 0.1);
overflow: hidden;
}
.hf-ui-input-value {
max-width: calc(var(--hf-input-value-progress) * 100%);
overflow: hidden;
white-space: nowrap;
font-size: 28px;
font-weight: 750;
}
.hf-ui-input-caret {
width: 3px;
height: 32px;
margin-left: 4px;
border-radius: 999px;
background: #18181b;
opacity: var(--hf-input-focus);
}
.hf-ui-input-helper {
color: #71717a;
font-size: 20px;
}
</style>
</head>
<body>
<div
id="demo"
data-composition-id="input-demo"
data-start="0"
data-width="1920"
data-height="1080"
data-duration="5"
>
<div class="card">
<label class="hf-ui-input-field">
<span class="hf-ui-input-label">Project name</span>
<span class="hf-ui-input-shell">
<span class="hf-ui-input-value">Launch recap</span>
<span class="hf-ui-input-caret"></span>
</span>
<span class="hf-ui-input-helper">Ready for the next render.</span>
</label>
</div>
<script>
const tl = gsap.timeline({ paused: true });
tl.to(
".hf-ui-input-field",
{ "--hf-input-focus": 1, duration: 0.2, ease: "power2.out" },
0.5,
);
tl.to(
".hf-ui-input-field",
{ "--hf-input-value-progress": 1, duration: 1.0, ease: "steps(12)" },
0.75,
);
tl.to(
".hf-ui-input-caret",
{ opacity: 0.15, duration: 0.25, repeat: 5, yoyo: true, ease: "none" },
1.1,
);
window.__timelines = window.__timelines || {};
window.__timelines["input-demo"] = tl;
</script>
</div>
</body>
</html>