30 Tailwind CSS Grid Layouts
23 / 30

All 30 in 30 Tailwind CSS Grid Layouts

  1. 01Tailwind Full-Bleed Article Layout for Long-Form Editorial
  2. 02Tailwind Docs Layout with Sticky Table of Contents
  3. 03Tailwind Photo Gallery Grid with auto-fill and Real Images
  4. 04Tailwind Holy Grail Page Layout for a News Site
  5. 05Tailwind Data Table with Subgrid Rows and Status Pills
  6. 06Tailwind Overlapping Card Hero for a Case Study
  7. 07Tailwind Help Center Layout with Fixed Sidebars
  8. 08Tailwind 12 Column Grid System for Marketing Pages
  9. 09Tailwind Bento Grid for a Product Feature Section
  10. 10Tailwind Magazine Spread Layout with Overlapping Headline
  11. 11Tailwind Responsive Card Grid for an Integrations Directory
  12. 12Tailwind CMS Category Grid that Compacts Itself with has()
  13. 13Tailwind Masonry Layout for a Saved Ideas Board
  14. 14Tailwind Hexagon Team Grid with clip-path Avatars
  15. 15Tailwind Subgrid Cards with Perfectly Aligned Buttons
  16. 16Tailwind Analytics Dashboard Layout with Grid App Shell
  17. 17Tailwind Pricing Table with Subgrid and a Featured Plan
  18. 18Tailwind Kanban Board with Scroll Snap Columns
  19. 19Tailwind Video Thumbnail Grid with Zero Layout Shift
  20. 20Tailwind Container Query Card for Reusable Article Teasers
  21. 21Tailwind Diagonal Section Band with skewY Counter-Skew
  22. 22Tailwind Asymmetric Poster Hero with Layered Grid Regions
  23. 23Tailwind Mosaic Photo Wall with a Designed Span Sequence
  24. 24Tailwind Dense Grid Packing for a Mixed-Size Asset Library
  25. 25Tailwind Onboarding Stepper with CSS Counters
  26. 26Tailwind macOS Window Layout with Vibrancy Sidebar
  27. 27Tailwind Scroll Snap Carousel with Peeking Slides
  28. 28Tailwind Status Map UI with Grid Coordinate Pins
  29. 29Tailwind Logo Wall with 1px Gap Hairline Dividers
  30. 30Tailwind Periodic Table Layout with Grid Coordinates
Pure TailwindMIT licensed

Tailwind Mosaic Photo Wall with a Designed Span Sequence

A destination wall for a travel brand: ten photographs in a designed span sequence where every visual row sums to six columns, so the mosaic interlocks with no holes and keeps its curated order.

Live Demo
Plain CSSTailwind v4
Try it

Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-time

Untitled UI React · Affiliate link

Get Untitled UI Pro

The code

<section class="tgx-23 w-full min-h-svh bg-tgx23-bg font-tgx23-sans p-6">
  <header class="flex items-end justify-between gap-4 flex-wrap mb-4">
    <div class="flex flex-col gap-1">
      <p class="text-[0.66rem] tracking-[0.18em] uppercase text-tgx23-accent">Meridian Travel</p>
      <h2 class="text-[1.35rem] font-semibold text-white tracking-[-0.01em]">Where we go in autumn</h2>
    </div>
    <p class="text-[0.76rem] text-tgx23-dim">Ten frames · one repeat unit</p>
  </header>
  <div class="grid grid-cols-6 max-sm:grid-cols-3 auto-rows-[minmax(70px,auto)] gap-2.5">
    <figure tabindex="0" class="group relative col-span-3 row-span-2 rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=700&h=500&q=80&auto=format&fit=crop" alt="Sunlight falling through a birch forest" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-8 px-3 pb-2.5 text-[0.76rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Kuusamo, Finland <span class="font-normal text-white/75">· 6 nights</span></figcaption>
    </figure>
    <figure tabindex="0" class="group relative col-span-2 row-span-2 rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1426604966848-d7adac402bff?w=500&h=500&q=80&auto=format&fit=crop" alt="Broad green valley with a river below" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-8 px-3 pb-2.5 text-[0.76rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Glen Affric <span class="font-normal text-white/75">· 4 nights</span></figcaption>
    </figure>
    <figure tabindex="0" class="group relative rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1493246507139-91e8fad9978e?w=300&h=300&q=80&auto=format&fit=crop" alt="Flat sea under a pale sky" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-6 px-2 pb-1.5 text-[0.66rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Skagen</figcaption>
    </figure>
    <figure tabindex="0" class="group relative rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1447752875215-b2761acb3c5d?w=300&h=300&q=80&auto=format&fit=crop" alt="Path through pine woodland" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-6 px-2 pb-1.5 text-[0.66rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Harz</figcaption>
    </figure>
    <figure tabindex="0" class="group relative col-span-2 row-span-3 rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?w=500&h=750&q=80&auto=format&fit=crop" alt="Tall rock face rising into mist" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-8 px-3 pb-2.5 text-[0.76rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Lofoten <span class="font-normal text-white/75">· 8 nights</span></figcaption>
    </figure>
    <figure tabindex="0" class="group relative col-span-2 rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1469474968028-56623f02e42e?w=500&h=280&q=80&auto=format&fit=crop" alt="Mountain range with cloud in the valley" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-6 px-3 pb-1.5 text-[0.7rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Hardanger</figcaption>
    </figure>
    <figure tabindex="0" class="group relative col-span-2 row-span-2 rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=500&h=500&q=80&auto=format&fit=crop" alt="Still lake below a wooded ridge at dusk" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-8 px-3 pb-2.5 text-[0.76rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Lake Bled <span class="font-normal text-white/75">· 3 nights</span></figcaption>
    </figure>
    <figure tabindex="0" class="group relative col-span-2 rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?w=500&h=280&q=80&auto=format&fit=crop" alt="Coastal ridge under breaking cloud" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-6 px-3 pb-1.5 text-[0.7rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Faroes</figcaption>
    </figure>
    <figure tabindex="0" class="group relative col-span-3 rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1449824913935-59a10b8d2000?w=700&h=280&q=80&auto=format&fit=crop" alt="City skyline at night from across the water" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-6 px-3 pb-1.5 text-[0.7rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Stopover: Copenhagen</figcaption>
    </figure>
    <figure tabindex="0" class="group relative rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1480714378408-67cf0d13bc1b?w=300&h=300&q=80&auto=format&fit=crop" alt="Dense city skyline at dusk" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-6 px-2 pb-1.5 text-[0.66rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">+ 12 more</figcaption>
    </figure>
  </div>
</section>
@import "tailwindcss";

@theme {
  --color-tgx23-bg: #1b241d;
  --color-tgx23-bg: oklch(0.23 0.02 145);
  --color-tgx23-cell: #2b362d;
  --color-tgx23-cell: oklch(0.31 0.02 145);
  --color-tgx23-dim: #b3c1b6;
  --color-tgx23-dim: oklch(0.79 0.02 145);
  --color-tgx23-accent: #9fdc86;
  --color-tgx23-accent: oklch(0.84 0.13 135);
  --color-tgx23-ring: #b7e87f;
  --color-tgx23-ring: oklch(0.87 0.13 130);
  --font-tgx23-sans: 'Inter Tight', system-ui, sans-serif;
}

.tgx-23 {
  width: 100%;
  min-height: 100svh;
}

Setup — do this once per project

Skip this if your project already runs Tailwind v4.

1Load Tailwind
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

Compiles in the browser — perfect for a CodePen or a quick test, not for production.

2Add the stylesheetRequiredthe @theme block is what makes the custom utilities exist
@import "tailwindcss";

@theme {
  --color-tgx23-bg: #1b241d;
  --color-tgx23-bg: oklch(0.23 0.02 145);
  --color-tgx23-cell: #2b362d;
  --color-tgx23-cell: oklch(0.31 0.02 145);
  --color-tgx23-dim: #b3c1b6;
  --color-tgx23-dim: oklch(0.79 0.02 145);
  --color-tgx23-accent: #9fdc86;
  --color-tgx23-accent: oklch(0.84 0.13 135);
  --color-tgx23-ring: #b7e87f;
  --color-tgx23-ring: oklch(0.87 0.13 130);
  --font-tgx23-sans: 'Inter Tight', system-ui, sans-serif;
}

.tgx-23 {
  width: 100%;
  min-height: 100svh;
}
3Fonts used by this demooptional — skip if you have your own type stack
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preconnect" href="https://images.unsplash.com">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600&display=swap">

What changed in the port

Which parts became utilities, which stayed CSS, and why.

  • Captions now carry a destination and a trip length, which turns the wall from a pattern demo into a browsable product surface without adding a single layout rule.
  • Photography exposes what gradients hid: the 2×3 portrait frame needs a portrait source, and the panoramic frames need wide ones. Span sequence and art direction are the same decision.
  • Product upgrade: ten gradient tiles became ten real destinations with a brand header; the mobile breakpoint halves the column count rather than clamping spans with a variable.
Paste this into ChatGPT, Claude, Cursor, or any coding assistant. The block below is pre-framed with everything the AI needs to integrate this demo into your project — markup, styles, scoping notes, and the source URL. Hit Copy and paste straight into your chat.
Here's a working CSS demo from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: Tailwind Mosaic Photo Wall with a Designed Span Sequence
Source: https://codefronts.com/layouts/tailwind-css-grid-layouts/tailwind-mosaic-photo-wall-designed-span-sequence/

A destination wall for a travel brand: ten photographs in a designed span sequence where every visual row sums to six columns, so the mosaic interlocks with no holes and keeps its curated order.
## HTML
```html
<section class="tgx-23 w-full min-h-svh bg-tgx23-bg font-tgx23-sans p-6">
  <header class="flex items-end justify-between gap-4 flex-wrap mb-4">
    <div class="flex flex-col gap-1">
      <p class="text-[0.66rem] tracking-[0.18em] uppercase text-tgx23-accent">Meridian Travel</p>
      <h2 class="text-[1.35rem] font-semibold text-white tracking-[-0.01em]">Where we go in autumn</h2>
    </div>
    <p class="text-[0.76rem] text-tgx23-dim">Ten frames · one repeat unit</p>
  </header>
  <div class="grid grid-cols-6 max-sm:grid-cols-3 auto-rows-[minmax(70px,auto)] gap-2.5">
    <figure tabindex="0" class="group relative col-span-3 row-span-2 rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=700&h=500&q=80&auto=format&fit=crop" alt="Sunlight falling through a birch forest" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-8 px-3 pb-2.5 text-[0.76rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Kuusamo, Finland <span class="font-normal text-white/75">· 6 nights</span></figcaption>
    </figure>
    <figure tabindex="0" class="group relative col-span-2 row-span-2 rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1426604966848-d7adac402bff?w=500&h=500&q=80&auto=format&fit=crop" alt="Broad green valley with a river below" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-8 px-3 pb-2.5 text-[0.76rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Glen Affric <span class="font-normal text-white/75">· 4 nights</span></figcaption>
    </figure>
    <figure tabindex="0" class="group relative rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1493246507139-91e8fad9978e?w=300&h=300&q=80&auto=format&fit=crop" alt="Flat sea under a pale sky" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-6 px-2 pb-1.5 text-[0.66rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Skagen</figcaption>
    </figure>
    <figure tabindex="0" class="group relative rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1447752875215-b2761acb3c5d?w=300&h=300&q=80&auto=format&fit=crop" alt="Path through pine woodland" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-6 px-2 pb-1.5 text-[0.66rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Harz</figcaption>
    </figure>
    <figure tabindex="0" class="group relative col-span-2 row-span-3 rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?w=500&h=750&q=80&auto=format&fit=crop" alt="Tall rock face rising into mist" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-8 px-3 pb-2.5 text-[0.76rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Lofoten <span class="font-normal text-white/75">· 8 nights</span></figcaption>
    </figure>
    <figure tabindex="0" class="group relative col-span-2 rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1469474968028-56623f02e42e?w=500&h=280&q=80&auto=format&fit=crop" alt="Mountain range with cloud in the valley" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-6 px-3 pb-1.5 text-[0.7rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Hardanger</figcaption>
    </figure>
    <figure tabindex="0" class="group relative col-span-2 row-span-2 rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=500&h=500&q=80&auto=format&fit=crop" alt="Still lake below a wooded ridge at dusk" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-8 px-3 pb-2.5 text-[0.76rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Lake Bled <span class="font-normal text-white/75">· 3 nights</span></figcaption>
    </figure>
    <figure tabindex="0" class="group relative col-span-2 rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?w=500&h=280&q=80&auto=format&fit=crop" alt="Coastal ridge under breaking cloud" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-6 px-3 pb-1.5 text-[0.7rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Faroes</figcaption>
    </figure>
    <figure tabindex="0" class="group relative col-span-3 rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1449824913935-59a10b8d2000?w=700&h=280&q=80&auto=format&fit=crop" alt="City skyline at night from across the water" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-6 px-3 pb-1.5 text-[0.7rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">Stopover: Copenhagen</figcaption>
    </figure>
    <figure tabindex="0" class="group relative rounded-xl overflow-hidden bg-tgx23-cell focus-visible:outline-2 focus-visible:outline-tgx23-ring focus-visible:outline-offset-2">
      <img src="https://images.unsplash.com/photo-1480714378408-67cf0d13bc1b?w=300&h=300&q=80&auto=format&fit=crop" alt="Dense city skyline at dusk" loading="lazy" class="absolute inset-0 w-full h-full object-cover">
      <span aria-hidden="true" class="absolute inset-0 bg-black/0 transition-colors duration-300 group-hover:bg-black/35 group-focus-within:bg-black/35 motion-reduce:transition-none"></span>
      <figcaption class="absolute inset-x-0 bottom-0 z-10 pt-6 px-2 pb-1.5 text-[0.66rem] font-medium text-white bg-[linear-gradient(180deg,transparent,oklch(0.14_0.02_140/0.88))] opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">+ 12 more</figcaption>
    </figure>
  </div>
</section>
```
## CSS
```css
@import "tailwindcss";

@theme {
  --color-tgx23-bg: #1b241d;
  --color-tgx23-bg: oklch(0.23 0.02 145);
  --color-tgx23-cell: #2b362d;
  --color-tgx23-cell: oklch(0.31 0.02 145);
  --color-tgx23-dim: #b3c1b6;
  --color-tgx23-dim: oklch(0.79 0.02 145);
  --color-tgx23-accent: #9fdc86;
  --color-tgx23-accent: oklch(0.84 0.13 135);
  --color-tgx23-ring: #b7e87f;
  --color-tgx23-ring: oklch(0.87 0.13 130);
  --font-tgx23-sans: 'Inter Tight', system-ui, sans-serif;
}

.tgx-23 {
  width: 100%;
  min-height: 100svh;
}
```

How this works

The interlock is arithmetic. Ten frames form one repeat unit; append another ten in the same sequence and the wall extends seamlessly.

Deliberately not dense. Demo 24 backfills holes by reordering; here the order is the curation, so the spans are designed instead.

Make it yours

  • Re-compose by editing the sequence — keep each visual row summing to 6.
  • Finer control on large walls: 8 or 12 columns.
  • One oversized statement frame per repeat gives the wall a focal point.

Gotchas — read before shipping

  • A sequence that does not sum to the column count leaves holes; fix the arithmetic rather than reaching for dense.
  • Tall spans need portrait sources — landscape crops badly in them.
  • Keep the gap modest (8–12px): a mosaic reads as one composition, wide gutters shatter it into cards.

Browser support

ChromeSafariFirefoxEdge
111+16.4+128+111+

Original-spec grid throughout.

Techniques used in this demo

Utilitiesfirst-class utility or variant

Search CodeFronts

Loading…