GALLERIES / FREE HTML + ASTRO

Photography contact sheet

A numbered contact-sheet gallery with compact captions, fine rules and an optional enlarged view.

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-photography-contact-sheet s-gallery-section s-contact-sheet" data-snippet="photography-contact-sheet" aria-labelledby="fct-photography-contact-sheet-heading"><div class="s-wrap"><p class="s-kicker">A closer look</p><h2 id="fct-photography-contact-sheet-heading">Between places / 01–06</h2><p class="s-gallery-intro">Licensed illustrative photographs. Replace these with your own images and descriptions.</p><div class="s-gallery"><figure class=""><a href="images/coast.webp" data-gallery-index="0"><img src="images/coast.webp" alt="Rocky coast beside open water" width="800" height="600" loading="eager" decoding="async"></a><figcaption>01 / Rocky coast beside open water</figcaption></figure><figure class=""><a href="images/passage.webp" data-gallery-index="1"><img src="images/passage.webp" alt="Escalator lights inside a station" width="800" height="600" loading="lazy" decoding="async"></a><figcaption>02 / Escalator lights inside a station</figcaption></figure><figure class=""><a href="images/boathouse.webp" data-gallery-index="2"><img src="images/boathouse.webp" alt="Boathouse reflected in still water" width="800" height="600" loading="lazy" decoding="async"></a><figcaption>03 / Boathouse reflected in still water</figcaption></figure><figure class=""><a href="images/venice.webp" data-gallery-index="3"><img src="images/venice.webp" alt="Canal and buildings in Venice" width="800" height="600" loading="lazy" decoding="async"></a><figcaption>04 / Canal and buildings in Venice</figcaption></figure><figure class=""><a href="images/forest.webp" data-gallery-index="4"><img src="images/forest.webp" alt="Lake reflected between forest trees" width="800" height="600" loading="lazy" decoding="async"></a><figcaption>05 / Lake reflected between forest trees</figcaption></figure><figure class=""><a href="images/blue-hour.webp" data-gallery-index="5"><img src="images/blue-hour.webp" alt="Lakeside cabin below mountains at dusk" width="800" height="600" loading="lazy" decoding="async"></a><figcaption>06 / Lakeside cabin below mountains at dusk</figcaption></figure></div><dialog aria-label="Enlarged image" class="s-lightbox"><button type="button" data-close>Close</button><figure><img alt="" width="800" height="600"><figcaption></figcaption></figure><div class="s-lightbox-controls"><button type="button" data-prev>Previous</button><span role="status" data-image-count></span><button type="button" data-next>Next</button></div></dialog></div></section>

Where this design fits

The numbered sequence supports work that is meant to be read in order. The layout uses document order consistently as it changes from four columns to two and then one.

  • Numbered sequence
  • Fine-rule layout
  • Progressive enlarged views

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/photography-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.