Split hero
Yellow half with a lead statement and a dark button beside a photograph uncovered by a teal and blue wipe on load.
Part of the style
Pixel Map Yellow
7 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/pixel-map-yellow/hero/figma.html?palette=10fe3879be341cfd
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/pixel-map-yellow/hero/figma.html?palette=10fe3879be341cfd and pass that whole HTML document to the html_to_figma tool, so the part "Split hero" 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: #080808;
--ink: #b5c2d5;
--white: #b1b1b1;
--field: #0d0d0d;
--ink-soft: rgba(181, 194, 213, 0.6);
--flame: #694740;
--sun: #694740;
--sun-pale: #5d433e;
--sea: #694740;
--sky: #694740;
}
</style>
<section class="hero">
<div class="hero__field">
<p class="hero__lead">Valdorna sends sound artists and walkers to live for a season in three hill villages, listening with the people who stay there and making work the villages keep.</p>
<a class="hero__button" href="#">Read the field notes</a>
</div>
<figure class="hero__frame">
<img class="hero__photo" src="assets/alley.jpg" alt="A stone-paved lane in a mountain village, two people walking away with baskets of firewood" width="900" height="1200" loading="eager">
<span class="hero__wipe" aria-hidden="true"><span class="hero__strip"></span></span>
</figure>
</section>
<style>
.hero {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
min-height: clamp(420px, 46vw, 640px);
background: var(--paper);
}
.hero__field {
display: flex;
flex-direction: column;
justify-content: flex-start;
gap: var(--space-m);
padding: var(--space-l) var(--edge) var(--section-space);
background: var(--sun);
}
.hero__lead {
max-width: 30em;
margin: 0;
font-size: var(--text-l);
line-height: 1.3;
}
.hero__button {
display: inline-flex;
align-items: center;
justify-content: center;
align-self: flex-start;
min-height: var(--button-h);
padding: 0 var(--space-l);
border-radius: var(--radius);
background: var(--ink);
color: var(--white);
font-size: var(--text-xs);
text-decoration: none;
text-transform: uppercase;
transition: background-color var(--quick) var(--ease), color var(--quick) var(--ease);
}
.hero__button:hover,
.hero__button:focus-visible {
background: var(--flame);
}
.hero__button:focus-visible {
outline: var(--rule) solid var(--ink);
outline-offset: 3px;
}
.hero__frame {
position: relative;
margin: 0;
overflow: hidden;
background: var(--sea);
}
.hero__photo {
width: 100%;
height: 100%;
min-height: 100%;
object-fit: cover;
object-position: 50% 60%;
}
.hero__wipe {
position: absolute;
inset: 0;
background: var(--sea);
animation: hero-wipe var(--slow) var(--ease) 500ms both;
}
.hero__strip {
position: absolute;
top: 0;
right: 0;
left: 0;
height: 9%;
background: var(--sky);
}
@keyframes hero-wipe {
from { transform: translateY(0); }
to { transform: translateY(-101%); }
}
@media (max-width: 48rem) {
.hero {
grid-template-columns: 1fr;
min-height: 0;
background: linear-gradient(var(--sun) 88%, var(--paper) 88%);
}
.hero__field { padding: var(--space-xl) var(--edge) var(--space-l); }
.hero__button { align-self: stretch; }
.hero__frame {
width: 80%;
aspect-ratio: 1 / 1;
}
}
@media (prefers-reduced-motion: reduce) {
.hero__wipe { display: none; }
}
</style>