Preview links stay in the example. Copy the source to use your own destinations. Form previews never send information.
Copy the source HTML CSS JavaScript Astro
Copy HTML <section
class="fct-rooms-interior-contact-sheet e-gallery-contact-sheet"
data-snippet="rooms-interior-contact-sheet"
aria-labelledby="fct-rooms-interior-contact-sheet-title"
>
<div class="c-inner">
<header class="c-gallery-heading">
<div>
<p class="c-kicker">ROOMS / IMAGE STUDIES</p>
<h2 id="fct-rooms-interior-contact-sheet-title">Rooms, details and natural light.</h2>
</div>
<p>Photographs, places and points of view.<br />A collection of illustrative studies.</p>
</header>
<form class="c-gallery-controls">
<fieldset disabled>
<legend class="c-visually-hidden">Filter and sort image studies</legend>
<label
>Find a study<input
name="search"
type="search"
placeholder="Search titles, type or year"
maxlength="100" /></label
><label
>Type<select name="type">
<option value="all">All types</option>
<option value="living">Living</option>
<option value="workspaces">Workspaces</option>
<option value="details">Details</option>
</select></label
><label
>Sort<select name="sort">
<option value="newest">Newest first</option>
<option value="oldest">Oldest first</option>
<option value="title">Title A–Z</option>
</select></label
><button type="reset">Reset filters</button>
</fieldset>
</form>
<div class="c-gallery-toolbar">
<p role="status" data-gallery-status>6 studies</p>
<div role="group" aria-label="Gallery view">
<button type="button" data-view="grid" aria-pressed="true" disabled>Grid</button
><button type="button" data-view="list" aria-pressed="false" disabled>List</button>
</div>
</div>
<ul class="c-projects" data-current-view="grid">
<li
data-project
data-type="living"
data-title="Room and material"
data-year="2025"
data-image="0"
>
<a class="c-project-image" href="images/room.webp" data-gallery-index="0"
><img
src="images/room.webp"
width="1120"
height="747"
alt="Living room with pale seating and timber furniture"
loading="eager"
/></a>
<div class="c-project-caption">
<h3><a href="images/room.webp" data-gallery-index="0">Room and material</a></h3>
<p><span>Living</span><span>2025</span></p>
</div>
</li>
<li
data-project
data-type="workspaces"
data-title="Light in the living room"
data-year="2024"
data-image="1"
>
<a class="c-project-image" href="images/living.webp" data-gallery-index="1"
><img
src="images/living.webp"
width="1120"
height="747"
alt="Living room with a sofa and circular mirrors"
loading="eager"
/></a>
<div class="c-project-caption">
<h3><a href="images/living.webp" data-gallery-index="1">Light in the living room</a></h3>
<p><span>Workspaces</span><span>2024</span></p>
</div>
</li>
<li
data-project
data-type="details"
data-title="A quieter room"
data-year="2023"
data-image="2"
>
<a class="c-project-image" href="images/bedroom.webp" data-gallery-index="2"
><img
src="images/bedroom.webp"
width="1120"
height="747"
alt="Bedroom with blue walls and a bed"
loading="lazy"
/></a>
<div class="c-project-caption">
<h3><a href="images/bedroom.webp" data-gallery-index="2">A quieter room</a></h3>
<p><span>Details</span><span>2023</span></p>
</div>
</li>
<li
data-project
data-type="living"
data-title="A place at the table"
data-year="2022"
data-image="3"
>
<a class="c-project-image" href="images/dining.webp" data-gallery-index="3"
><img
src="images/dining.webp"
width="1120"
height="747"
alt="Timber dining table with mismatched chairs"
loading="lazy"
/></a>
<div class="c-project-caption">
<h3><a href="images/dining.webp" data-gallery-index="3">A place at the table</a></h3>
<p><span>Living</span><span>2022</span></p>
</div>
</li>
<li
data-project
data-type="workspaces"
data-title="Shared meeting room"
data-year="2021"
data-image="4"
>
<a class="c-project-image" href="images/meeting.webp" data-gallery-index="4"
><img
src="images/meeting.webp"
width="1120"
height="747"
alt="Long table with chairs in a light-filled meeting room"
loading="lazy"
/></a>
<div class="c-project-caption">
<h3><a href="images/meeting.webp" data-gallery-index="4">Shared meeting room</a></h3>
<p><span>Workspaces</span><span>2021</span></p>
</div>
</li>
<li
data-project
data-type="details"
data-title="A working interior"
data-year="2020"
data-image="5"
>
<a class="c-project-image" href="images/office.webp" data-gallery-index="5"
><img
src="images/office.webp"
width="1120"
height="747"
alt="Interior with shared work surfaces, books and plants"
loading="lazy"
/></a>
<div class="c-project-caption">
<h3><a href="images/office.webp" data-gallery-index="5">A working interior</a></h3>
<p><span>Details</span><span>2020</span></p>
</div>
</li>
</ul>
<p class="c-gallery-empty" hidden>No studies match. Clear the search or choose another type.</p>
<dialog aria-label="Enlarged study image">
<button type="button" data-close>Close ×</button>
<figure>
<img width="1120" height="747" alt="" />
<figcaption></figcaption>
</figure>
<div class="c-viewer-controls">
<button type="button" data-prev>Previous</button
><span role="status" data-viewer-count></span><button type="button" data-next>Next</button>
</div>
</dialog>
<noscript
><p class="c-note">
The filters and view controls require JavaScript. All six images remain available as normal
full-size links.
</p></noscript
>
<p class="c-note c-gallery-note">
Licensed illustrative photographs with fictional study titles and sample years. These are not
commissions, products or completed projects of Rooms.
</p>
</div>
</section>
Copy CSS .fct-rooms-interior-contact-sheet {
--ink: #252a27;
--muted: #5c655f;
--line: #c7ccc4;
--accent: #294c39;
background: #fff;
color: var(--ink);
font:
16px/1.55 Arial,
Helvetica,
sans-serif;
}
.fct-rooms-interior-contact-sheet,
.fct-rooms-interior-contact-sheet * {
box-sizing: border-box;
}
.fct-rooms-interior-contact-sheet :is(h2, h3, h4, p, ul, figure, dl, dd) {
margin: 0;
}
.fct-rooms-interior-contact-sheet :is(h2, h3, h4) {
font-weight: 400;
line-height: 1.1;
letter-spacing: -0.04em;
}
.fct-rooms-interior-contact-sheet a {
color: inherit;
text-underline-offset: 4px;
}
.fct-rooms-interior-contact-sheet :is(input, select, button) {
font: inherit;
color: inherit;
}
.fct-rooms-interior-contact-sheet :is(a, button, input, select, summary):focus-visible {
outline: 3px solid #a33d12;
outline-offset: 4px;
}
.fct-rooms-interior-contact-sheet .c-inner {
max-width: 1360px;
margin: auto;
padding: 50px clamp(20px, 4vw, 56px);
}
.fct-rooms-interior-contact-sheet .c-kicker {
font-size: 0.8125rem;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.fct-rooms-interior-contact-sheet .c-note {
font-size: 0.8125rem;
color: var(--muted);
}
.fct-rooms-interior-contact-sheet img {
display: block;
width: 100%;
height: auto;
}
.fct-rooms-interior-contact-sheet [hidden] {
display: none !important;
}
.fct-rooms-interior-contact-sheet .c-link {
display: flex;
align-items: center;
justify-content: space-between;
gap: 15px;
min-height: 44px;
text-decoration: none;
border-bottom: 1px solid currentColor;
padding-block: 10px;
}
.fct-rooms-interior-contact-sheet button {
min-height: 44px;
cursor: pointer;
}
.fct-rooms-interior-contact-sheet summary {
min-height: 44px;
align-content: center;
cursor: pointer;
}
.fct-rooms-interior-contact-sheet .c-visually-hidden {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
@media (max-width: 700px) {
.fct-rooms-interior-contact-sheet .c-inner {
padding-block: 32px;
}
}
.fct-rooms-interior-contact-sheet {
--ink: #272727;
--muted: #6b6b6b;
--line: #d7d7d7;
}
.fct-rooms-interior-contact-sheet .c-inner {
max-width: 1480px;
}
.fct-rooms-interior-contact-sheet .c-gallery-heading {
display: flex;
justify-content: space-between;
align-items: end;
gap: 40px;
margin-bottom: 40px;
}
.fct-rooms-interior-contact-sheet h2 {
font-size: clamp(2.25rem, 4.5vw, 4rem);
letter-spacing: -0.055em;
}
.fct-rooms-interior-contact-sheet .c-gallery-heading > p {
font-size: 0.9375rem;
color: var(--muted);
max-width: 35ch;
}
.fct-rooms-interior-contact-sheet fieldset {
border: 0;
padding: 22px 0;
margin: 0;
min-width: 0;
display: grid;
grid-template-columns: 1.3fr 1fr 1fr auto;
gap: 20px;
align-items: end;
border-block: 1px solid #bcbcbc;
}
.fct-rooms-interior-contact-sheet label {
display: grid;
gap: 8px;
font-size: 0.75rem;
color: #555;
}
.fct-rooms-interior-contact-sheet :is(input, select) {
min-height: 44px;
border: 1px solid #bdbdbd;
background: white;
padding: 9px 12px;
border-radius: 0;
min-width: 0;
width: 100%;
font-size: 0.9375rem;
}
.fct-rooms-interior-contact-sheet button {
border: 1px solid #bdbdbd;
background: #fff;
padding: 10px 14px;
border-radius: 0;
font-size: 0.875rem;
}
.fct-rooms-interior-contact-sheet .c-gallery-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
margin: 20px 0 30px;
font-size: 0.8125rem;
color: var(--muted);
}
.fct-rooms-interior-contact-sheet [role="group"] {
display: flex;
gap: 0;
}
.fct-rooms-interior-contact-sheet [data-view] + [data-view] {
border-left: 0;
}
.fct-rooms-interior-contact-sheet [data-view][aria-pressed="true"] {
background: #2b2b2b;
color: white;
border-color: #2b2b2b;
}
.fct-rooms-interior-contact-sheet .c-projects {
list-style: none;
padding: 0;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 45px 28px;
align-items: start;
}
.fct-rooms-interior-contact-sheet .c-project-image {
display: block;
min-width: 0;
}
.fct-rooms-interior-contact-sheet .c-project-image img {
aspect-ratio: 4/3;
object-fit: cover;
}
.fct-rooms-interior-contact-sheet .c-projects > li:nth-child(3n + 2) .c-project-image img {
aspect-ratio: 1/1;
}
.fct-rooms-interior-contact-sheet .c-project-caption {
padding-top: 15px;
}
.fct-rooms-interior-contact-sheet h3 {
font-size: 1rem;
letter-spacing: 0;
line-height: 1.35;
}
.fct-rooms-interior-contact-sheet h3 a {
text-decoration: none;
display: inline-flex;
min-height: 32px;
align-items: center;
}
.fct-rooms-interior-contact-sheet h3 a:hover {
text-decoration: underline;
}
.fct-rooms-interior-contact-sheet .c-project-caption p {
display: flex;
justify-content: space-between;
gap: 20px;
font-size: 0.75rem;
color: #686868;
margin-top: 4px;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] {
display: block;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] > li {
display: grid;
grid-template-columns: 150px 1fr;
gap: 25px;
align-items: center;
padding: 18px 0;
border-top: 1px solid #d7d7d7;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] .c-project-image img {
aspect-ratio: 1.5/1 !important;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] .c-project-caption {
padding: 0;
display: grid;
grid-template-columns: 1fr 0.8fr;
gap: 20px;
align-items: center;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] .c-project-caption p {
margin: 0;
gap: 20px;
}
.fct-rooms-interior-contact-sheet .c-gallery-empty {
padding: 30px 0;
font-size: 0.9375rem;
color: var(--muted);
}
.fct-rooms-interior-contact-sheet .c-gallery-note {
border-top: 1px solid #bcbcbc;
padding-top: 22px;
margin-top: 38px;
}
.fct-rooms-interior-contact-sheet dialog {
max-width: min(1120px, calc(100vw - 24px));
max-height: calc(100dvh - 24px);
border: 0;
background: #fff;
color: #272727;
padding: 20px;
}
.fct-rooms-interior-contact-sheet dialog::backdrop {
background: #111e;
}
.fct-rooms-interior-contact-sheet dialog[open] {
display: flex;
flex-direction: column;
gap: 15px;
}
.fct-rooms-interior-contact-sheet [data-close] {
align-self: end;
}
.fct-rooms-interior-contact-sheet dialog img {
max-height: 65dvh;
object-fit: contain;
width: auto;
max-width: 100%;
margin: auto;
}
.fct-rooms-interior-contact-sheet figcaption {
font-size: 0.875rem;
padding-top: 12px;
}
.fct-rooms-interior-contact-sheet .c-viewer-controls {
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
}
.fct-rooms-interior-contact-sheet .c-viewer-controls > span {
font-size: 0.8125rem;
}
@media (max-width: 900px) {
.fct-rooms-interior-contact-sheet fieldset {
grid-template-columns: 1fr 1fr;
gap: 16px;
}
.fct-rooms-interior-contact-sheet fieldset button {
justify-self: start;
}
.fct-rooms-interior-contact-sheet .c-projects {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.fct-rooms-interior-contact-sheet .c-projects > li .c-project-image img {
aspect-ratio: 4/3 !important;
}
}
@media (max-width: 600px) {
.fct-rooms-interior-contact-sheet .c-gallery-heading {
display: block;
margin-bottom: 28px;
}
.fct-rooms-interior-contact-sheet .c-gallery-heading > p {
margin-top: 20px;
}
.fct-rooms-interior-contact-sheet fieldset {
grid-template-columns: 1fr;
}
.fct-rooms-interior-contact-sheet fieldset button {
justify-self: stretch;
}
.fct-rooms-interior-contact-sheet .c-projects {
grid-template-columns: 1fr;
gap: 30px;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] > li {
grid-template-columns: 85px 1fr;
gap: 15px;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] .c-project-caption {
display: block;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] .c-project-caption p {
margin-top: 7px;
font-size: 0.6875rem;
}
.fct-rooms-interior-contact-sheet h3 {
font-size: 0.9375rem;
}
}
.fct-rooms-interior-contact-sheet {
--paper: #f4f7fa;
--accent: #1f4368;
}
.fct-rooms-interior-contact-sheet {
background: var(--paper);
}
.fct-rooms-interior-contact-sheet .c-gallery-heading h2 {
max-width: 900px;
}
.fct-rooms-interior-contact-sheet .c-kicker {
color: #535e56;
}
.fct-rooms-interior-contact-sheet .c-gallery-toolbar [data-view][aria-pressed="true"] {
background: var(--accent);
border-color: var(--accent);
color: #fff;
}
.fct-rooms-interior-contact-sheet .c-gallery-controls :is(input, select) {
background: #fff;
}
.fct-rooms-interior-contact-sheet .c-project-image {
background: #e6e8e1;
}
.fct-rooms-interior-contact-sheet .c-project-image img {
transition: none;
}
.fct-rooms-interior-contact-sheet .c-project-caption h3 {
font-weight: 400;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="list"] .c-project-image {
max-width: 150px;
}
.fct-rooms-interior-contact-sheet .c-gallery-heading > p {
max-width: 32ch;
}
.fct-rooms-interior-contact-sheet {
background: white;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] {
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 32px 20px;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] li .c-project-image img {
aspect-ratio: 1/1 !important;
}
.fct-rooms-interior-contact-sheet .c-project-caption {
border-top: 1px solid #bfc5b9;
margin-top: 12px;
padding-top: 10px;
}
.fct-rooms-interior-contact-sheet .c-gallery-heading {
border-top: 5px solid var(--accent);
padding-top: 24px;
}
@media (max-width: 900px) {
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 30px 24px;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] {
columns: 2;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] > li:nth-child(even) {
padding-top: 0;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="list"] > li {
grid-template-columns: 120px 1fr;
gap: 22px;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="list"] h3 {
font-size: 1.1rem;
}
}
@media (max-width: 600px) {
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] {
grid-template-columns: 1fr;
columns: 1;
gap: 30px;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] > li {
grid-column: auto !important;
flex-basis: 88%;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] li .c-project-image img {
aspect-ratio: 4/3 !important;
}
.fct-rooms-interior-contact-sheet
.c-projects[data-current-view="grid"]
> li:first-child
.c-project-caption {
display: block;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="list"] > li {
grid-template-columns: 80px 1fr;
gap: 15px;
padding-block: 18px;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="list"] .c-project-caption {
display: block;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="list"] h3 {
font-size: 0.9375rem;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="list"] .c-project-caption p {
margin-top: 5px;
}
}
Copy JavaScript (() => {
for (const root of document.querySelectorAll('[data-snippet="rooms-interior-contact-sheet"]')) {
if (root.dataset.initialized) continue;
root.dataset.initialized = "true";
const form = root.querySelector("form"),
list = root.querySelector(".c-projects"),
items = Array.from(list.children),
viewButtons = root.querySelectorAll("[data-view]"),
dialog = root.querySelector("dialog");
let visible = items.slice(),
current = 0,
last = null;
form.querySelector("fieldset").disabled = false;
for (const button of viewButtons) {
button.disabled = false;
button.addEventListener("click", () => {
list.dataset.currentView = button.dataset.view;
for (const b of viewButtons) b.setAttribute("aria-pressed", String(b === button));
});
}
const update = () => {
const q = form.elements.search.value.trim().toLocaleLowerCase(),
type = form.elements.type.value,
sort = form.elements.sort.value;
visible = items
.filter(
(item) =>
(type === "all" || item.dataset.type === type) &&
(!q ||
(item.dataset.title + " " + item.dataset.type + " " + item.dataset.year)
.toLocaleLowerCase()
.includes(q)),
)
.sort((a, b) =>
sort === "title"
? a.dataset.title.localeCompare(b.dataset.title)
: sort === "oldest"
? Number(a.dataset.year) - Number(b.dataset.year)
: Number(b.dataset.year) - Number(a.dataset.year),
);
for (const item of items) item.hidden = !visible.includes(item);
for (const item of visible) list.append(item);
root.querySelector("[data-gallery-status]").textContent =
visible.length + " " + (visible.length === 1 ? "study" : "studies");
root.querySelector(".c-gallery-empty").hidden = !!visible.length;
};
form.addEventListener("submit", (e) => e.preventDefault());
form.addEventListener("input", update);
form.addEventListener("change", update);
form.addEventListener("reset", (e) => {
e.preventDefault();
form.elements.search.value = "";
form.elements.type.value = "all";
form.elements.sort.value = "newest";
update();
});
const show = (i) => {
current = (i + visible.length) % visible.length;
const item = visible[current],
image = item.querySelector("img"),
target = dialog.querySelector("img");
target.src = image.src;
target.alt = image.alt;
dialog.querySelector("figcaption").textContent =
item.dataset.title + " · " + item.dataset.year;
root.querySelector("[data-viewer-count]").textContent = current + 1 + " / " + visible.length;
};
root.addEventListener("click", (e) => {
const anchor = e.target.closest("[data-gallery-index]");
if (anchor && !e.ctrlKey && !e.metaKey && typeof dialog.showModal === "function") {
e.preventDefault();
last = anchor;
const item = anchor.closest("[data-project]");
show(visible.indexOf(item));
dialog.showModal();
}
});
root.querySelector("[data-close]").addEventListener("click", () => dialog.close());
root.querySelector("[data-prev]").addEventListener("click", () => show(current - 1));
root.querySelector("[data-next]").addEventListener("click", () => show(current + 1));
dialog.addEventListener("keydown", (e) => {
if (["ArrowLeft", "ArrowRight"].includes(e.key)) {
e.preventDefault();
show(current + (e.key === "ArrowRight" ? 1 : -1));
}
});
dialog.addEventListener("close", () => last?.focus());
update();
}
})();
Copy Astro ---
// Original reusable section. Use unique IDs, selectors and radio names before duplicating.
---
<section
class="fct-rooms-interior-contact-sheet e-gallery-contact-sheet"
data-snippet="rooms-interior-contact-sheet"
aria-labelledby="fct-rooms-interior-contact-sheet-title"
>
<div class="c-inner">
<header class="c-gallery-heading">
<div>
<p class="c-kicker">ROOMS / IMAGE STUDIES</p>
<h2 id="fct-rooms-interior-contact-sheet-title">Rooms, details and natural light.</h2>
</div>
<p>Photographs, places and points of view.<br />A collection of illustrative studies.</p>
</header>
<form class="c-gallery-controls">
<fieldset disabled>
<legend class="c-visually-hidden">Filter and sort image studies</legend>
<label
>Find a study<input
name="search"
type="search"
placeholder="Search titles, type or year"
maxlength="100" /></label
><label
>Type<select name="type">
<option value="all">All types</option>
<option value="living">Living</option>
<option value="workspaces">Workspaces</option>
<option value="details">Details</option>
</select></label
><label
>Sort<select name="sort">
<option value="newest">Newest first</option>
<option value="oldest">Oldest first</option>
<option value="title">Title A–Z</option>
</select></label
><button type="reset">Reset filters</button>
</fieldset>
</form>
<div class="c-gallery-toolbar">
<p role="status" data-gallery-status>6 studies</p>
<div role="group" aria-label="Gallery view">
<button type="button" data-view="grid" aria-pressed="true" disabled>Grid</button
><button type="button" data-view="list" aria-pressed="false" disabled>List</button>
</div>
</div>
<ul class="c-projects" data-current-view="grid">
<li
data-project
data-type="living"
data-title="Room and material"
data-year="2025"
data-image="0"
>
<a
class="c-project-image"
href="/snippet-assets/rooms-interior-contact-sheet/images/room.webp"
data-gallery-index="0"
><img
src="/snippet-assets/rooms-interior-contact-sheet/images/room.webp"
width="1120"
height="747"
alt="Living room with pale seating and timber furniture"
loading="eager"
/></a>
<div class="c-project-caption">
<h3>
<a
href="/snippet-assets/rooms-interior-contact-sheet/images/room.webp"
data-gallery-index="0"
>Room and material</a
>
</h3>
<p><span>Living</span><span>2025</span></p>
</div>
</li>
<li
data-project
data-type="workspaces"
data-title="Light in the living room"
data-year="2024"
data-image="1"
>
<a
class="c-project-image"
href="/snippet-assets/rooms-interior-contact-sheet/images/living.webp"
data-gallery-index="1"
><img
src="/snippet-assets/rooms-interior-contact-sheet/images/living.webp"
width="1120"
height="747"
alt="Living room with a sofa and circular mirrors"
loading="eager"
/></a>
<div class="c-project-caption">
<h3>
<a
href="/snippet-assets/rooms-interior-contact-sheet/images/living.webp"
data-gallery-index="1"
>Light in the living room</a
>
</h3>
<p><span>Workspaces</span><span>2024</span></p>
</div>
</li>
<li
data-project
data-type="details"
data-title="A quieter room"
data-year="2023"
data-image="2"
>
<a
class="c-project-image"
href="/snippet-assets/rooms-interior-contact-sheet/images/bedroom.webp"
data-gallery-index="2"
><img
src="/snippet-assets/rooms-interior-contact-sheet/images/bedroom.webp"
width="1120"
height="747"
alt="Bedroom with blue walls and a bed"
loading="lazy"
/></a>
<div class="c-project-caption">
<h3>
<a
href="/snippet-assets/rooms-interior-contact-sheet/images/bedroom.webp"
data-gallery-index="2"
>A quieter room</a
>
</h3>
<p><span>Details</span><span>2023</span></p>
</div>
</li>
<li
data-project
data-type="living"
data-title="A place at the table"
data-year="2022"
data-image="3"
>
<a
class="c-project-image"
href="/snippet-assets/rooms-interior-contact-sheet/images/dining.webp"
data-gallery-index="3"
><img
src="/snippet-assets/rooms-interior-contact-sheet/images/dining.webp"
width="1120"
height="747"
alt="Timber dining table with mismatched chairs"
loading="lazy"
/></a>
<div class="c-project-caption">
<h3>
<a
href="/snippet-assets/rooms-interior-contact-sheet/images/dining.webp"
data-gallery-index="3"
>A place at the table</a
>
</h3>
<p><span>Living</span><span>2022</span></p>
</div>
</li>
<li
data-project
data-type="workspaces"
data-title="Shared meeting room"
data-year="2021"
data-image="4"
>
<a
class="c-project-image"
href="/snippet-assets/rooms-interior-contact-sheet/images/meeting.webp"
data-gallery-index="4"
><img
src="/snippet-assets/rooms-interior-contact-sheet/images/meeting.webp"
width="1120"
height="747"
alt="Long table with chairs in a light-filled meeting room"
loading="lazy"
/></a>
<div class="c-project-caption">
<h3>
<a
href="/snippet-assets/rooms-interior-contact-sheet/images/meeting.webp"
data-gallery-index="4"
>Shared meeting room</a
>
</h3>
<p><span>Workspaces</span><span>2021</span></p>
</div>
</li>
<li
data-project
data-type="details"
data-title="A working interior"
data-year="2020"
data-image="5"
>
<a
class="c-project-image"
href="/snippet-assets/rooms-interior-contact-sheet/images/office.webp"
data-gallery-index="5"
><img
src="/snippet-assets/rooms-interior-contact-sheet/images/office.webp"
width="1120"
height="747"
alt="Interior with shared work surfaces, books and plants"
loading="lazy"
/></a>
<div class="c-project-caption">
<h3>
<a
href="/snippet-assets/rooms-interior-contact-sheet/images/office.webp"
data-gallery-index="5"
>A working interior</a
>
</h3>
<p><span>Details</span><span>2020</span></p>
</div>
</li>
</ul>
<p class="c-gallery-empty" hidden>No studies match. Clear the search or choose another type.</p>
<dialog aria-label="Enlarged study image">
<button type="button" data-close>Close ×</button>
<figure>
<img width="1120" height="747" alt="" />
<figcaption></figcaption>
</figure>
<div class="c-viewer-controls">
<button type="button" data-prev>Previous</button
><span role="status" data-viewer-count></span><button type="button" data-next>Next</button>
</div>
</dialog>
<noscript
><p class="c-note">
The filters and view controls require JavaScript. All six images remain available as normal
full-size links.
</p></noscript
>
<p class="c-note c-gallery-note">
Licensed illustrative photographs with fictional study titles and sample years. These are not
commissions, products or completed projects of Rooms.
</p>
</div>
</section>
<style is:global>
.fct-rooms-interior-contact-sheet {
--ink: #252a27;
--muted: #5c655f;
--line: #c7ccc4;
--accent: #294c39;
background: #fff;
color: var(--ink);
font:
16px/1.55 Arial,
Helvetica,
sans-serif;
}
.fct-rooms-interior-contact-sheet,
.fct-rooms-interior-contact-sheet * {
box-sizing: border-box;
}
.fct-rooms-interior-contact-sheet :is(h2, h3, h4, p, ul, figure, dl, dd) {
margin: 0;
}
.fct-rooms-interior-contact-sheet :is(h2, h3, h4) {
font-weight: 400;
line-height: 1.1;
letter-spacing: -0.04em;
}
.fct-rooms-interior-contact-sheet a {
color: inherit;
text-underline-offset: 4px;
}
.fct-rooms-interior-contact-sheet :is(input, select, button) {
font: inherit;
color: inherit;
}
.fct-rooms-interior-contact-sheet :is(a, button, input, select, summary):focus-visible {
outline: 3px solid #a33d12;
outline-offset: 4px;
}
.fct-rooms-interior-contact-sheet .c-inner {
max-width: 1360px;
margin: auto;
padding: 50px clamp(20px, 4vw, 56px);
}
.fct-rooms-interior-contact-sheet .c-kicker {
font-size: 0.8125rem;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.fct-rooms-interior-contact-sheet .c-note {
font-size: 0.8125rem;
color: var(--muted);
}
.fct-rooms-interior-contact-sheet img {
display: block;
width: 100%;
height: auto;
}
.fct-rooms-interior-contact-sheet [hidden] {
display: none !important;
}
.fct-rooms-interior-contact-sheet .c-link {
display: flex;
align-items: center;
justify-content: space-between;
gap: 15px;
min-height: 44px;
text-decoration: none;
border-bottom: 1px solid currentColor;
padding-block: 10px;
}
.fct-rooms-interior-contact-sheet button {
min-height: 44px;
cursor: pointer;
}
.fct-rooms-interior-contact-sheet summary {
min-height: 44px;
align-content: center;
cursor: pointer;
}
.fct-rooms-interior-contact-sheet .c-visually-hidden {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
@media (max-width: 700px) {
.fct-rooms-interior-contact-sheet .c-inner {
padding-block: 32px;
}
}
.fct-rooms-interior-contact-sheet {
--ink: #272727;
--muted: #6b6b6b;
--line: #d7d7d7;
}
.fct-rooms-interior-contact-sheet .c-inner {
max-width: 1480px;
}
.fct-rooms-interior-contact-sheet .c-gallery-heading {
display: flex;
justify-content: space-between;
align-items: end;
gap: 40px;
margin-bottom: 40px;
}
.fct-rooms-interior-contact-sheet h2 {
font-size: clamp(2.25rem, 4.5vw, 4rem);
letter-spacing: -0.055em;
}
.fct-rooms-interior-contact-sheet .c-gallery-heading > p {
font-size: 0.9375rem;
color: var(--muted);
max-width: 35ch;
}
.fct-rooms-interior-contact-sheet fieldset {
border: 0;
padding: 22px 0;
margin: 0;
min-width: 0;
display: grid;
grid-template-columns: 1.3fr 1fr 1fr auto;
gap: 20px;
align-items: end;
border-block: 1px solid #bcbcbc;
}
.fct-rooms-interior-contact-sheet label {
display: grid;
gap: 8px;
font-size: 0.75rem;
color: #555;
}
.fct-rooms-interior-contact-sheet :is(input, select) {
min-height: 44px;
border: 1px solid #bdbdbd;
background: white;
padding: 9px 12px;
border-radius: 0;
min-width: 0;
width: 100%;
font-size: 0.9375rem;
}
.fct-rooms-interior-contact-sheet button {
border: 1px solid #bdbdbd;
background: #fff;
padding: 10px 14px;
border-radius: 0;
font-size: 0.875rem;
}
.fct-rooms-interior-contact-sheet .c-gallery-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
margin: 20px 0 30px;
font-size: 0.8125rem;
color: var(--muted);
}
.fct-rooms-interior-contact-sheet [role="group"] {
display: flex;
gap: 0;
}
.fct-rooms-interior-contact-sheet [data-view] + [data-view] {
border-left: 0;
}
.fct-rooms-interior-contact-sheet [data-view][aria-pressed="true"] {
background: #2b2b2b;
color: white;
border-color: #2b2b2b;
}
.fct-rooms-interior-contact-sheet .c-projects {
list-style: none;
padding: 0;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 45px 28px;
align-items: start;
}
.fct-rooms-interior-contact-sheet .c-project-image {
display: block;
min-width: 0;
}
.fct-rooms-interior-contact-sheet .c-project-image img {
aspect-ratio: 4/3;
object-fit: cover;
}
.fct-rooms-interior-contact-sheet .c-projects > li:nth-child(3n + 2) .c-project-image img {
aspect-ratio: 1/1;
}
.fct-rooms-interior-contact-sheet .c-project-caption {
padding-top: 15px;
}
.fct-rooms-interior-contact-sheet h3 {
font-size: 1rem;
letter-spacing: 0;
line-height: 1.35;
}
.fct-rooms-interior-contact-sheet h3 a {
text-decoration: none;
display: inline-flex;
min-height: 32px;
align-items: center;
}
.fct-rooms-interior-contact-sheet h3 a:hover {
text-decoration: underline;
}
.fct-rooms-interior-contact-sheet .c-project-caption p {
display: flex;
justify-content: space-between;
gap: 20px;
font-size: 0.75rem;
color: #686868;
margin-top: 4px;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] {
display: block;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] > li {
display: grid;
grid-template-columns: 150px 1fr;
gap: 25px;
align-items: center;
padding: 18px 0;
border-top: 1px solid #d7d7d7;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] .c-project-image img {
aspect-ratio: 1.5/1 !important;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] .c-project-caption {
padding: 0;
display: grid;
grid-template-columns: 1fr 0.8fr;
gap: 20px;
align-items: center;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] .c-project-caption p {
margin: 0;
gap: 20px;
}
.fct-rooms-interior-contact-sheet .c-gallery-empty {
padding: 30px 0;
font-size: 0.9375rem;
color: var(--muted);
}
.fct-rooms-interior-contact-sheet .c-gallery-note {
border-top: 1px solid #bcbcbc;
padding-top: 22px;
margin-top: 38px;
}
.fct-rooms-interior-contact-sheet dialog {
max-width: min(1120px, calc(100vw - 24px));
max-height: calc(100dvh - 24px);
border: 0;
background: #fff;
color: #272727;
padding: 20px;
}
.fct-rooms-interior-contact-sheet dialog::backdrop {
background: #111e;
}
.fct-rooms-interior-contact-sheet dialog[open] {
display: flex;
flex-direction: column;
gap: 15px;
}
.fct-rooms-interior-contact-sheet [data-close] {
align-self: end;
}
.fct-rooms-interior-contact-sheet dialog img {
max-height: 65dvh;
object-fit: contain;
width: auto;
max-width: 100%;
margin: auto;
}
.fct-rooms-interior-contact-sheet figcaption {
font-size: 0.875rem;
padding-top: 12px;
}
.fct-rooms-interior-contact-sheet .c-viewer-controls {
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
}
.fct-rooms-interior-contact-sheet .c-viewer-controls > span {
font-size: 0.8125rem;
}
@media (max-width: 900px) {
.fct-rooms-interior-contact-sheet fieldset {
grid-template-columns: 1fr 1fr;
gap: 16px;
}
.fct-rooms-interior-contact-sheet fieldset button {
justify-self: start;
}
.fct-rooms-interior-contact-sheet .c-projects {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.fct-rooms-interior-contact-sheet .c-projects > li .c-project-image img {
aspect-ratio: 4/3 !important;
}
}
@media (max-width: 600px) {
.fct-rooms-interior-contact-sheet .c-gallery-heading {
display: block;
margin-bottom: 28px;
}
.fct-rooms-interior-contact-sheet .c-gallery-heading > p {
margin-top: 20px;
}
.fct-rooms-interior-contact-sheet fieldset {
grid-template-columns: 1fr;
}
.fct-rooms-interior-contact-sheet fieldset button {
justify-self: stretch;
}
.fct-rooms-interior-contact-sheet .c-projects {
grid-template-columns: 1fr;
gap: 30px;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] > li {
grid-template-columns: 85px 1fr;
gap: 15px;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] .c-project-caption {
display: block;
}
.fct-rooms-interior-contact-sheet [data-current-view="list"] .c-project-caption p {
margin-top: 7px;
font-size: 0.6875rem;
}
.fct-rooms-interior-contact-sheet h3 {
font-size: 0.9375rem;
}
}
.fct-rooms-interior-contact-sheet {
--paper: #f4f7fa;
--accent: #1f4368;
}
.fct-rooms-interior-contact-sheet {
background: var(--paper);
}
.fct-rooms-interior-contact-sheet .c-gallery-heading h2 {
max-width: 900px;
}
.fct-rooms-interior-contact-sheet .c-kicker {
color: #535e56;
}
.fct-rooms-interior-contact-sheet .c-gallery-toolbar [data-view][aria-pressed="true"] {
background: var(--accent);
border-color: var(--accent);
color: #fff;
}
.fct-rooms-interior-contact-sheet .c-gallery-controls :is(input, select) {
background: #fff;
}
.fct-rooms-interior-contact-sheet .c-project-image {
background: #e6e8e1;
}
.fct-rooms-interior-contact-sheet .c-project-image img {
transition: none;
}
.fct-rooms-interior-contact-sheet .c-project-caption h3 {
font-weight: 400;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="list"] .c-project-image {
max-width: 150px;
}
.fct-rooms-interior-contact-sheet .c-gallery-heading > p {
max-width: 32ch;
}
.fct-rooms-interior-contact-sheet {
background: white;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] {
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 32px 20px;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] li .c-project-image img {
aspect-ratio: 1/1 !important;
}
.fct-rooms-interior-contact-sheet .c-project-caption {
border-top: 1px solid #bfc5b9;
margin-top: 12px;
padding-top: 10px;
}
.fct-rooms-interior-contact-sheet .c-gallery-heading {
border-top: 5px solid var(--accent);
padding-top: 24px;
}
@media (max-width: 900px) {
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 30px 24px;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] {
columns: 2;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] > li:nth-child(even) {
padding-top: 0;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="list"] > li {
grid-template-columns: 120px 1fr;
gap: 22px;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="list"] h3 {
font-size: 1.1rem;
}
}
@media (max-width: 600px) {
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] {
grid-template-columns: 1fr;
columns: 1;
gap: 30px;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] > li {
grid-column: auto !important;
flex-basis: 88%;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="grid"] li .c-project-image img {
aspect-ratio: 4/3 !important;
}
.fct-rooms-interior-contact-sheet
.c-projects[data-current-view="grid"]
> li:first-child
.c-project-caption {
display: block;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="list"] > li {
grid-template-columns: 80px 1fr;
gap: 15px;
padding-block: 18px;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="list"] .c-project-caption {
display: block;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="list"] h3 {
font-size: 0.9375rem;
}
.fct-rooms-interior-contact-sheet .c-projects[data-current-view="list"] .c-project-caption p {
margin-top: 5px;
}
}
</style>
<script is:inline>
(() => {
for (const root of document.querySelectorAll('[data-snippet="rooms-interior-contact-sheet"]')) {
if (root.dataset.initialized) continue;
root.dataset.initialized = "true";
const form = root.querySelector("form"),
list = root.querySelector(".c-projects"),
items = Array.from(list.children),
viewButtons = root.querySelectorAll("[data-view]"),
dialog = root.querySelector("dialog");
let visible = items.slice(),
current = 0,
last = null;
form.querySelector("fieldset").disabled = false;
for (const button of viewButtons) {
button.disabled = false;
button.addEventListener("click", () => {
list.dataset.currentView = button.dataset.view;
for (const b of viewButtons) b.setAttribute("aria-pressed", String(b === button));
});
}
const update = () => {
const q = form.elements.search.value.trim().toLocaleLowerCase(),
type = form.elements.type.value,
sort = form.elements.sort.value;
visible = items
.filter(
(item) =>
(type === "all" || item.dataset.type === type) &&
(!q ||
(item.dataset.title + " " + item.dataset.type + " " + item.dataset.year)
.toLocaleLowerCase()
.includes(q)),
)
.sort((a, b) =>
sort === "title"
? a.dataset.title.localeCompare(b.dataset.title)
: sort === "oldest"
? Number(a.dataset.year) - Number(b.dataset.year)
: Number(b.dataset.year) - Number(a.dataset.year),
);
for (const item of items) item.hidden = !visible.includes(item);
for (const item of visible) list.append(item);
root.querySelector("[data-gallery-status]").textContent =
visible.length + " " + (visible.length === 1 ? "study" : "studies");
root.querySelector(".c-gallery-empty").hidden = !!visible.length;
};
form.addEventListener("submit", (e) => e.preventDefault());
form.addEventListener("input", update);
form.addEventListener("change", update);
form.addEventListener("reset", (e) => {
e.preventDefault();
form.elements.search.value = "";
form.elements.type.value = "all";
form.elements.sort.value = "newest";
update();
});
const show = (i) => {
current = (i + visible.length) % visible.length;
const item = visible[current],
image = item.querySelector("img"),
target = dialog.querySelector("img");
target.src = image.src;
target.alt = image.alt;
dialog.querySelector("figcaption").textContent =
item.dataset.title + " · " + item.dataset.year;
root.querySelector("[data-viewer-count]").textContent = current + 1 + " / " + visible.length;
};
root.addEventListener("click", (e) => {
const anchor = e.target.closest("[data-gallery-index]");
if (anchor && !e.ctrlKey && !e.metaKey && typeof dialog.showModal === "function") {
e.preventDefault();
last = anchor;
const item = anchor.closest("[data-project]");
show(visible.indexOf(item));
dialog.showModal();
}
});
root.querySelector("[data-close]").addEventListener("click", () => dialog.close());
root.querySelector("[data-prev]").addEventListener("click", () => show(current - 1));
root.querySelector("[data-next]").addEventListener("click", () => show(current + 1));
dialog.addEventListener("keydown", (e) => {
if (["ArrowLeft", "ArrowRight"].includes(e.key)) {
e.preventDefault();
show(current + (e.key === "ArrowRight" ? 1 : -1));
}
});
dialog.addEventListener("close", () => last?.focus());
update();
}
})();
</script>
Code tabs need JavaScript. All source formats are included in the open downloads.