Intro loader
Grey screen with a pulsing dot and a corner counter that runs to 100, then the wordmark slides in at the top left. A replay button runs it again.
Part of the style
Wireframe Ledger
6 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/wireframe-ledger/loader/figma.html?palette=58dd8b3476801bea
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/wireframe-ledger/loader/figma.html?palette=58dd8b3476801bea and pass that whole HTML document to the html_to_figma tool, so the part "Intro loader" lands as editable layers in my open Figma file. Fonts come from Google Fonts: if a face is missing in Figma, pick the closest one.
Code
<style>
/* Goes after the pack's base.css */
:root {
--paper: #533f37;
--ink: #fff4e1;
--ink-mid: rgba(255, 244, 225, 0.6);
--ink-soft: rgba(255, 244, 225, 0.45);
--rule: rgba(255, 244, 225, 0.16);
--rule-strong: #fff4e1;
--mist: #604b43;
--fog: #6d5850;
--sand: #624d45;
--on-wine: #533f37;
--wine: #ffb901;
--signal: #be9069;
}
</style>
<section class="loader" aria-label="Intro">
<p class="loader__mark" aria-label="Keel">KEEL</p>
<span class="loader__dot" aria-hidden="true"></span>
<p class="loader__count" aria-live="off"><span class="loader__tick" aria-hidden="true"></span><span class="loader__number">00</span></p>
<button class="loader__replay" type="button">Replay intro</button>
</section>
<style>
.loader {
position: relative;
height: clamp(22rem, 58vw, 40rem);
background: var(--mist);
color: var(--ink);
overflow: hidden;
}
.loader__mark {
position: absolute;
top: var(--gutter);
left: var(--gutter);
margin: 0;
font-family: var(--font-mark);
font-size: clamp(2rem, 1.2rem + 3.4vw, 4rem);
line-height: 1;
letter-spacing: -0.02em;
transition: transform var(--mid) var(--ease), opacity var(--mid) var(--ease);
}
.loader.is-counting .loader__mark {
transform: translateY(40%);
opacity: 0;
}
.loader__dot {
position: absolute;
top: 50%;
left: 50%;
width: 8px;
height: 8px;
margin: -4px 0 0 -4px;
border-radius: var(--radius-round);
background: var(--ink);
opacity: 0;
transition: opacity var(--quick) var(--ease-colour);
}
.loader.is-counting .loader__dot {
opacity: 1;
animation: loader-pulse 0.9s var(--ease) infinite alternate;
}
@keyframes loader-pulse {
to { transform: scale(0.45); opacity: 0.4; }
}
.loader__count {
position: absolute;
left: var(--gutter);
bottom: var(--gutter);
display: flex;
align-items: center;
gap: var(--space-xs);
margin: 0;
font-size: var(--text-label);
font-variant-numeric: tabular-nums;
letter-spacing: var(--track-label);
}
.loader__tick {
width: 12px;
height: 10px;
border-left: var(--hairline) solid var(--ink);
background: linear-gradient(var(--ink), var(--ink)) left center / 100% var(--hairline) no-repeat;
}
.loader__replay {
position: absolute;
right: var(--gutter);
bottom: calc(var(--gutter) - 0.9rem);
min-height: var(--tap);
padding: 0 var(--space-s);
border: 0;
background: none;
color: var(--ink-soft);
font: inherit;
font-size: var(--text-label);
letter-spacing: var(--track-label);
text-transform: uppercase;
cursor: pointer;
transition: color var(--quick) var(--ease-colour);
}
.loader__replay:hover { color: var(--ink); }
</style>
<script>
(() => {
const still = matchMedia('(prefers-reduced-motion: reduce)');
const duration = 1100;
function setup(root) {
const number = root.querySelector('.loader__number');
let frame = 0;
const show = (value) => { number.textContent = String(value).padStart(2, '0'); };
const finish = () => {
cancelAnimationFrame(frame);
show(100);
root.classList.remove('is-counting');
};
const play = () => {
if (still.matches) return finish();
cancelAnimationFrame(frame);
root.classList.add('is-counting');
const start = performance.now();
const tick = (now) => {
const progress = Math.min(1, (now - start) / duration);
show(Math.round(progress * 100));
if (progress < 1) frame = requestAnimationFrame(tick);
else finish();
};
frame = requestAnimationFrame(tick);
};
root.querySelector('.loader__replay').addEventListener('click', play);
let played = false;
const watcher = new IntersectionObserver(([entry]) => {
if (!entry.isIntersecting) return finish();
if (played) return;
played = true;
play();
});
watcher.observe(root);
}
document.querySelectorAll('.loader').forEach(setup);
})();
</script>