Contact footer
A scroll percentage counter with a filling hairline, a big serif email and a row of tiny links.
Part of the style
Teal Haze Lab
6 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/teal-haze-lab/contact/figma.html?palette=9c35948eb79ebaf4
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/teal-haze-lab/contact/figma.html?palette=9c35948eb79ebaf4 and pass that whole HTML document to the html_to_figma tool, so the part "Contact footer" 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 {
--field: #fafafa;
--ink: #1d0d07;
--night: #31221d;
--night-ink: #ffffff;
--screen: #4b3c37;
--screen-ink: #ffffff;
--paper: #ffffff;
--ray: #d1aa9d;
--glow: #9b7e74;
--field-deep: #926e62;
--field-bright: #fecbb9;
--lilac: #aa8679;
--pink: #aa8679;
}
</style>
<footer class="contact">
<div class="contact__meter">
<span class="contact__meter-label">Tuned in</span>
<span class="contact__meter-track" aria-hidden="true"><span class="contact__meter-fill"></span></span>
<span class="contact__meter-value">0%</span>
</div>
<p class="contact__intro">Got a room that should make a sound?</p>
<a class="contact__mail" href="#">hello@<wbr>halloway.studio</a>
<div class="contact__bottom">
<ul class="contact__links">
<li><a class="contact__link" href="#">Listening log</a></li>
<li><a class="contact__link" href="#">Field journal</a></li>
<li><a class="contact__link" href="#">Postcards</a></li>
</ul>
<p class="contact__sign">Wired by hand, mostly at night</p>
</div>
</footer>
<style>
.contact {
--contact-progress: 0;
position: relative;
display: grid;
grid-template-rows: auto 1fr auto auto;
gap: var(--space-m);
min-height: clamp(520px, 48vw, 700px);
padding: var(--space-m) var(--edge) var(--space-s);
overflow: hidden;
color: var(--ink);
background: radial-gradient(ellipse 60% 70% at 50% 100%, color-mix(in srgb, var(--glow) 60%, transparent), transparent 70%);
}
.contact__meter {
display: flex;
align-items: center;
gap: var(--space-m);
min-height: var(--tap);
}
.contact__meter-track {
position: relative;
flex: 0 1 220px;
height: var(--rule);
background: color-mix(in srgb, var(--ink) 25%, transparent);
}
.contact__meter-fill {
position: absolute;
inset: 0;
background: var(--ink);
transform: scaleX(var(--contact-progress));
transform-origin: 0 50%;
}
.contact__meter-label {
white-space: nowrap;
}
.contact__meter-value {
min-width: 4ch;
}
.contact__intro {
align-self: end;
margin: 0;
text-align: center;
}
.contact__mail {
justify-self: center;
font-family: var(--font-display);
font-size: clamp(36px, 7.6vw, 124px);
font-weight: var(--display-weight);
font-stretch: var(--display-stretch);
line-height: 0.9;
letter-spacing: var(--display-track);
text-align: center;
text-decoration: none;
overflow-wrap: anywhere;
background: linear-gradient(var(--ink), var(--ink)) 0 100% / 0 var(--rule) no-repeat;
transition: background-size var(--slow) var(--ease-out);
}
.contact__mail:hover,
.contact__mail:focus-visible {
background-size: 100% var(--rule);
outline: none;
}
.contact__bottom {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
gap: 0 var(--space-l);
margin-top: var(--space-l);
}
.contact__links {
display: flex;
flex-wrap: wrap;
gap: 0 var(--space-l);
margin: 0;
padding: 0;
list-style: none;
}
.contact__link {
display: inline-flex;
align-items: center;
min-height: var(--tap);
text-decoration: none;
}
.contact__link:hover,
.contact__link:focus-visible {
text-decoration: underline;
text-underline-offset: 3px;
outline: none;
}
.contact__sign {
margin: 0;
min-height: var(--tap);
display: flex;
align-items: center;
}
</style>
<script>
(() => {
function track(contact) {
const value = contact.querySelector('.contact__meter-value');
let visible = false;
const measure = () => {
const box = contact.getBoundingClientRect();
const progress = Math.min(1, Math.max(0, (innerHeight - box.top) / box.height));
contact.style.setProperty('--contact-progress', progress.toFixed(3));
value.textContent = `${Math.round(progress * 100)}%`;
};
new IntersectionObserver(([entry]) => {
visible = entry.isIntersecting;
if (visible) measure();
}).observe(contact);
addEventListener('scroll', () => { if (visible) measure(); }, { passive: true });
addEventListener('resize', measure);
measure();
}
document.querySelectorAll('.contact').forEach(track);
})();
</script>