Grey tile rail
Objects on pale grey tiles in a snapping rail, names in tall caps, prices below, round arrows and a black View all button.
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/lots/figma.html?palette=7ef8064dfd89d2ff
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/tall-caps-showroom/lots/figma.html?palette=7ef8064dfd89d2ff and pass that whole HTML document to the html_to_figma tool, so the part "Grey tile 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: #fbf4ee;
--ink-soft: rgba(251, 244, 238, 0.65);
--paper: #251a1a;
--paper-soft: rgba(37, 26, 26, 0.65);
--tile: #2b2020;
--rule: rgba(251, 244, 238, 0.18);
--rule-dark: rgba(37, 26, 26, 0.28);
--scrim: rgba(251, 244, 238, 0.32);
}
</style>
<section class="lots" aria-labelledby="lots-title">
<p class="lots__eyebrow">From the saleroom</p>
<h2 class="lots__title" id="lots-title">New at Varrow</h2>
<div class="lots__wrap">
<ul class="lots__rail">
<li class="lots__item">
<a class="lots__card" href="#">
<span class="lots__tile"><img class="lots__picture" src="assets/armchair.jpg" alt="Carved armchair with red tufted upholstery" width="610" height="800" loading="lazy"></span>
<span class="lots__name">Fenwick Parlour Chair</span>
<span class="lots__price"><span class="lots__was">$4,900.00</span> $3,920.00</span>
</a>
</li>
<li class="lots__item">
<a class="lots__card" href="#">
<span class="lots__tile"><img class="lots__picture" src="assets/table.jpg" alt="Six-sided centre table with a white marble top" width="800" height="633" loading="lazy"></span>
<span class="lots__name">Hale Marble Centre Table</span>
<span class="lots__price">$6,150.00</span>
</a>
</li>
<li class="lots__item">
<a class="lots__card" href="#">
<span class="lots__tile"><img class="lots__picture" src="assets/vase.jpg" alt="Blue and white tulip vase with five spouts" width="724" height="800" loading="lazy"></span>
<span class="lots__name">Five-Spout Tulip Vase</span>
<span class="lots__price">$1,280.00</span>
</a>
</li>
<li class="lots__item">
<a class="lots__card" href="#">
<span class="lots__tile"><img class="lots__picture" src="assets/lamp.jpg" alt="Bronze oil lamp with a figure on the handle" width="800" height="600" loading="lazy"></span>
<span class="lots__name">Bronze Lamp, Winged Handle</span>
<span class="lots__price">From $860.00</span>
</a>
</li>
</ul>
<button class="lots__arrow lots__arrow--prev" type="button" aria-label="Previous">
<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path d="M15 5 8 12l7 7"/></svg>
</button>
<button class="lots__arrow lots__arrow--next" type="button" aria-label="Next">
<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path d="m9 5 7 7-7 7"/></svg>
</button>
</div>
<a class="lots__button" href="#">View all</a>
</section>
<style>
.lots {
display: grid;
grid-template-columns: minmax(0, 1fr);
justify-items: center;
padding: var(--section-space) var(--edge);
background: var(--paper);
color: var(--ink);
text-align: center;
}
.lots__eyebrow {
margin: 0 0 var(--space-xs);
font-family: var(--font-label);
font-size: var(--label-xs);
font-weight: 500;
letter-spacing: var(--track-label);
text-transform: uppercase;
}
.lots__title {
margin: 0 0 var(--space-xl);
font-family: var(--font-display);
font-size: var(--display-l);
font-weight: 400;
line-height: 1.05;
letter-spacing: var(--track-display);
text-transform: uppercase;
}
.lots__wrap {
position: relative;
width: 100%;
}
.lots__rail {
display: grid;
grid-auto-flow: column;
grid-auto-columns: calc((100% - 3 * var(--gap)) / 4);
gap: var(--gap);
margin: 0;
padding: 0;
list-style: none;
overflow-x: auto;
scroll-snap-type: x mandatory;
scroll-behavior: smooth;
scrollbar-width: none;
}
.lots__rail::-webkit-scrollbar {
display: none;
}
.lots__item {
scroll-snap-align: start;
}
.lots__card {
display: grid;
gap: var(--space-xs);
color: inherit;
text-decoration: none;
}
.lots__tile {
display: grid;
place-items: center;
aspect-ratio: 1 / 1;
overflow: hidden;
background: var(--tile);
}
.lots__picture {
width: 78%;
height: 78%;
object-fit: contain;
mix-blend-mode: multiply;
filter: contrast(1.06);
transition: transform var(--zoom) var(--ease);
}
.lots__card:hover .lots__picture,
.lots__card:focus-visible .lots__picture {
transform: scale(1.06);
}
.lots__card:focus-visible {
outline: var(--rule-thin) solid var(--ink);
outline-offset: 4px;
}
.lots__name {
margin-top: var(--space-m);
padding: 0 var(--space-s);
font-family: var(--font-display);
font-size: var(--display-s);
line-height: 1.3;
letter-spacing: var(--track-display);
text-transform: uppercase;
text-wrap: balance;
}
.lots__price {
color: var(--ink-soft);
font-family: var(--font-label);
font-size: var(--text-s);
letter-spacing: 0.02em;
}
.lots__was {
margin-right: 0.4em;
text-decoration: line-through;
opacity: 0.6;
}
.lots__arrow {
position: absolute;
top: calc(var(--rail-tile, 12rem) / 2);
display: none;
place-items: center;
width: 44px;
height: 44px;
border: var(--rule-thin) solid var(--rule);
border-radius: var(--radius-round);
background: var(--paper);
color: var(--ink);
cursor: pointer;
translate: 0 -50%;
transition: background-color var(--quick) var(--ease-io), color var(--quick) var(--ease-io);
}
.lots__arrow svg {
fill: none;
stroke: currentColor;
stroke-width: 1.5;
}
.lots__arrow:hover,
.lots__arrow:focus-visible {
background: var(--ink);
color: var(--paper);
}
.lots__arrow--prev { left: var(--space-s); }
.lots__arrow--next { right: var(--space-s); }
.lots.is-scrollable .lots__arrow {
display: grid;
}
.lots__arrow[disabled] {
opacity: 0;
pointer-events: none;
}
.lots__button {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 44px;
margin-top: var(--space-xl);
padding: 0 var(--space-l);
border: var(--rule-thin) solid var(--ink);
background: var(--ink);
color: var(--paper);
text-decoration: none;
font-family: var(--font-label);
font-size: var(--label-xs);
font-weight: 500;
letter-spacing: var(--track-label);
text-transform: uppercase;
transition: background-color var(--quick) var(--ease-io), color var(--quick) var(--ease-io);
}
.lots__button:hover,
.lots__button:focus-visible {
background: var(--paper);
color: var(--ink);
}
@media (max-width: 56rem) {
.lots__rail {
grid-auto-columns: calc((100% - var(--gap)) / 2.15);
}
}
@media (prefers-reduced-motion: reduce) {
.lots__rail { scroll-behavior: auto; }
}
</style>
<script>
(() => {
for (const root of document.querySelectorAll('.lots')) {
const rail = root.querySelector('.lots__rail');
const prev = root.querySelector('.lots__arrow--prev');
const next = root.querySelector('.lots__arrow--next');
if (!rail || !prev || !next) continue;
const update = () => {
const tile = rail.querySelector('.lots__tile');
if (tile) root.style.setProperty('--rail-tile', tile.offsetHeight + 'px');
const room = rail.scrollWidth - rail.clientWidth;
root.classList.toggle('is-scrollable', room > 2);
prev.disabled = rail.scrollLeft < 2;
next.disabled = rail.scrollLeft > room - 2;
};
const step = (direction) => {
const item = rail.querySelector('.lots__item');
rail.scrollBy({ left: direction * (item ? item.offsetWidth : rail.clientWidth / 2) });
};
prev.addEventListener('click', () => step(-1));
next.addEventListener('click', () => step(1));
rail.addEventListener('scroll', update, { passive: true });
new ResizeObserver(update).observe(rail);
update();
}
})();
</script>