GALLERIES / FREE HTML + ASTRO

Rooms contact sheet gallery

A contact-sheet image composition for interiors with search, type filters, sorting and an accessible full-size viewer.

Try the design

Open demo ↗

Preview links stay in the example. Copy the source to use your own destinations. Form previews never send information.

Copy the source

<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>

Where this design fits

The contact-sheet layout changes how images, captions and space build the story while retaining one semantic list. Filters, sorting and the full-size viewer operate on the same current results. Replace the sample titles, years and photos together.

  • Combined category, title and year filtering
  • Grid/list views and native image dialog
  • Licensed images and no-JavaScript full-size links

The real-site reference

MoMA collection ↗

The reference informs collection browsing with searchable descriptive information. This example uses original branding, copy, styling and code; it does not reproduce the reference product or its assets. Reference inspected 2 November 2026. This example has its own branding, content and code; it is not affiliated with the reference product.

What is included

The HTML ZIP includes a standalone demo, reusable markup, scoped CSS, its small JavaScript runtime, a license and setup notes. The Astro ZIP includes Snippet.astro, local sample images and image credits. It can be imported into an existing Astro page or layout.

Replace the sample photographs

Included photographs are licensed illustrative assets. They are not work created by the demonstration business. Update image paths, dimensions, captions and alternative descriptions for your own files. The ZIP includes the original image-source and license notes.

Add it to an HTML website

  1. Copy snippet.html into the relevant page section.
  2. Load snippet.css after your existing site stylesheet. The class prefix identifies this design.
  3. Load snippet.js once with defer. Keep the included keyboard behavior when adapting interactions.
  4. Replace example content and check mobile widths, zoom, links and keyboard focus in your actual website.

Use it in Astro

Copy Snippet.astro into src/components/, import it into your page or shared layout, and insert the component where the section belongs. Copy images into public/snippet-assets/rooms-interior-contact-sheet/images; the component uses that public path. Keep each generated prefix unique if you duplicate a component on one page.

Keep the section maintainable

Start with the variables at the top of the CSS for background, text and accent colors. Preserve semantic labels and focus styles. Existing site selectors can still affect imported markup, so test the combined result. Read the complete setup notes.

GOOD DESIGN, OCCASIONALLY.

Your next idea
could start here.

New templates, useful guides, and updates from us.
A little inspiration for whatever you’re building.