Rounded photo rail
A centred heading over a rail of 6px-rounded photographs with a round arrow button and a newsletter card in black.
Part of the style
Tall Caps Showroom
7 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/tall-caps-showroom/community/figma.html?palette=d12d427770eca2b3
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/tall-caps-showroom/community/figma.html?palette=d12d427770eca2b3 and pass that whole HTML document to the html_to_figma tool, so the part "Rounded photo rail" 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 {
--ink: #ffffff;
--ink-soft: rgba(255, 255, 255, 0.65);
--paper: #131313;
--paper-soft: rgba(19, 19, 19, 0.65);
--tile: #191919;
--rule: rgba(255, 255, 255, 0.18);
--rule-dark: rgba(19, 19, 19, 0.28);
--scrim: rgba(255, 255, 255, 0.32);
}
</style>
<section class="community" aria-labelledby="community-title">
<h2 class="community__title" id="community-title">Seen in your rooms</h2>
<div class="community__wrap">
<ul class="community__rail">
<li class="community__item"><img class="community__picture" src="assets/bedroom.jpg" alt="Panelled bedroom with a canopy bed" width="800" height="606" loading="lazy"></li>
<li class="community__item"><img class="community__picture" src="assets/drawing-room.jpg" alt="Green drawing room with a chandelier" width="800" height="615" loading="lazy"></li>
<li class="community__item"><img class="community__picture" src="assets/carpet-field.jpg" alt="A knotted carpet hung on a wall" width="1047" height="1200" loading="lazy"></li>
<li class="community__item"><img class="community__picture" src="assets/entrance-hall.jpg" alt="Hall with a curving stair" width="800" height="772" loading="lazy"></li>
<li class="community__item"><img class="community__picture" src="assets/shaker-room.jpg" alt="Plain timber room with chairs" width="800" height="373" loading="lazy"></li>
<li class="community__item"><img class="community__picture" src="assets/dining-room.jpg" alt="Formal dining room" width="1200" height="820" loading="lazy"></li>
</ul>
<button class="community__arrow" type="button" aria-label="More pictures">
<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path d="m9 5 7 7-7 7"/></svg>
</button>
</div>
<form class="community__card" novalidate>
<button class="community__close" type="button" aria-label="Close sign-up">
<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path d="M5 5l14 14M19 5 5 19"/></svg>
</button>
<p class="community__card-title">Letters from the house</p>
<p class="community__card-copy">New arrivals, saleroom dates and the odd story about where things came from.</p>
<label class="community__label" for="community-email">E-mail</label>
<input class="community__field" id="community-email" type="email" name="email" placeholder="E-mail" required autocomplete="email">
<button class="community__submit" type="submit">Subscribe</button>
<p class="community__status" role="status" aria-live="polite"></p>
</form>
</section>
<style>
.community {
position: relative;
display: grid;
padding: var(--section-space) var(--edge);
background: var(--paper);
color: var(--ink);
}
.community__title {
margin: 0 0 var(--space-l);
font-family: var(--font-display);
font-size: var(--display-m);
font-weight: 400;
line-height: 1.1;
letter-spacing: var(--track-display);
text-align: center;
text-transform: uppercase;
}
.community__wrap {
position: relative;
}
.community__rail {
display: grid;
grid-auto-flow: column;
grid-auto-columns: calc((100% - 4 * var(--space-s)) / 5);
gap: var(--space-s);
margin: 0;
padding: 0;
list-style: none;
overflow-x: auto;
scroll-snap-type: x mandatory;
scroll-behavior: smooth;
scrollbar-width: none;
}
.community__rail::-webkit-scrollbar {
display: none;
}
.community__item {
aspect-ratio: 4 / 5;
overflow: hidden;
border-radius: var(--radius);
scroll-snap-align: start;
}
.community__picture {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform var(--zoom) var(--ease);
}
.community__item:hover .community__picture {
transform: scale(1.05);
}
.community__arrow {
position: absolute;
top: 50%;
right: calc(var(--space-s) * -1 + 0.25rem);
display: grid;
place-items: center;
width: 44px;
height: 44px;
border: 0;
border-radius: var(--radius-round);
background: var(--paper);
color: var(--ink);
box-shadow: 0 2px 10px var(--rule);
cursor: pointer;
translate: 0 -50%;
transition: transform var(--underline) var(--ease);
}
.community__arrow:hover,
.community__arrow:focus-visible {
transform: scale(1.08);
}
.community__arrow svg,
.community__close svg {
fill: none;
stroke: currentColor;
stroke-width: 1.5;
}
.community__card {
position: absolute;
right: var(--edge);
bottom: calc(var(--section-space) * -0.5);
z-index: 2;
display: grid;
gap: var(--space-s);
width: min(23rem, 100% - 2 * var(--edge));
padding: var(--space-l) var(--space-l) var(--space-l);
background: var(--ink);
color: var(--paper);
text-align: center;
transition: opacity var(--underline) var(--ease-io), translate var(--underline) var(--ease);
}
.community__card.is-closed {
opacity: 0;
translate: 0 1rem;
pointer-events: none;
}
.community__close {
position: absolute;
top: 0.25rem;
right: 0.25rem;
display: grid;
place-items: center;
width: 44px;
height: 44px;
border: 0;
background: none;
color: inherit;
cursor: pointer;
}
.community__card-title {
margin: 0;
padding: 0 var(--space-m);
font-family: var(--font-display);
font-size: 1.6rem;
line-height: 1.1;
letter-spacing: var(--track-display);
text-transform: uppercase;
}
.community__card-copy {
margin: 0 0 var(--space-s);
color: var(--paper-soft);
font-family: var(--font-body);
font-size: 0.9375rem;
line-height: var(--leading-body);
}
.community__label {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
}
.community__field {
min-height: 48px;
padding: 0 var(--space-s);
border: var(--rule-thin) solid var(--rule-dark);
border-radius: 0;
background: transparent;
color: var(--paper);
font: 400 var(--text-m) var(--font-body);
transition: border-color var(--quick) var(--ease-io);
}
.community__field::placeholder {
color: var(--paper-soft);
}
.community__field:focus {
outline: none;
border-color: var(--paper);
}
.community__field.is-invalid {
border-color: var(--paper);
border-style: dashed;
}
.community__submit {
min-height: 44px;
border: var(--rule-thin) solid var(--paper);
background: var(--paper);
color: var(--ink);
font-family: var(--font-label);
font-size: var(--label);
font-weight: 500;
letter-spacing: var(--track-label);
text-transform: uppercase;
cursor: pointer;
transition: background-color var(--quick) var(--ease-io), color var(--quick) var(--ease-io);
}
.community__submit:hover,
.community__submit:focus-visible {
background: var(--ink);
color: var(--paper);
}
.community__status {
min-height: 1.2em;
margin: 0;
color: var(--paper-soft);
font-family: var(--font-label);
font-size: var(--label-xs);
letter-spacing: var(--track-label);
text-transform: uppercase;
}
.community button:focus-visible {
outline: var(--rule-thin) solid currentColor;
outline-offset: 2px;
}
@media (max-width: 56rem) {
.community__rail {
grid-auto-columns: calc((100% - var(--space-s)) / 2.3);
}
.community__card {
position: relative;
right: auto;
bottom: auto;
width: 100%;
margin-top: var(--space-l);
}
.community__arrow {
right: var(--space-s);
}
}
@media (prefers-reduced-motion: reduce) {
.community__rail { scroll-behavior: auto; }
}
</style>
<script>
(() => {
for (const root of document.querySelectorAll('.community')) {
const rail = root.querySelector('.community__rail');
const arrow = root.querySelector('.community__arrow');
const card = root.querySelector('.community__card');
if (rail && arrow) {
arrow.addEventListener('click', () => {
const item = rail.querySelector('.community__item');
const end = rail.scrollLeft >= rail.scrollWidth - rail.clientWidth - 2;
rail.scrollTo({ left: end ? 0 : rail.scrollLeft + (item ? item.offsetWidth : 200) });
});
}
if (!card) continue;
const field = card.querySelector('.community__field');
const status = card.querySelector('.community__status');
card.querySelector('.community__close')?.addEventListener('click', () => card.classList.add('is-closed'));
card.addEventListener('submit', (event) => {
event.preventDefault();
const ok = field.checkValidity();
field.classList.toggle('is-invalid', !ok);
status.textContent = ok ? 'You are on the list.' : 'Please enter an e-mail address.';
if (ok) card.reset();
});
}
})();
</script>