30 Tailwind CSS Grid Layouts
10 / 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 Magazine Spread Layout with Overlapping Headline

A print-grade travel opener: the display headline crosses the photograph, a vertical byline runs up the gutter, the standfirst sits under a hairline rule and the body copy breaks into columns with a drop cap.

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-10 w-full min-h-svh bg-tgx10-paper text-tgx10-ink font-tgx10-serif px-6 py-10">
  <article class="grid grid-cols-12 grid-rows-[auto_auto_auto_1fr] gap-4 w-[min(700px,100%)] mx-auto">
    <figure class="col-start-5 col-end-13 row-start-1 row-end-4 max-sm:col-start-1 max-sm:row-end-2 z-10 overflow-hidden bg-tgx10-shade">
      <img src="https://images.unsplash.com/photo-1502602898657-3e91760cbb34?w=900&h=675&q=80&auto=format&fit=crop" alt="Parisian boulevard at dusk seen from a rooftop, lights coming on" loading="lazy" class="w-full h-full object-cover aspect-[4/3]">
    </figure>
    <h2 class="col-start-1 col-end-9 row-start-2 row-end-3 max-sm:col-end-13 z-20 text-[clamp(2rem,6vw,3.3rem)] leading-[1.02] font-bold tracking-[-0.015em] text-balance [text-shadow:0_0_18px_var(--color-tgx10-paper),0_0_6px_var(--color-tgx10-paper),2px_2px_0_var(--color-tgx10-paper)]">Forty hours in the tenth</h2>
    <p class="col-start-12 col-end-13 row-start-1 row-end-2 max-sm:hidden z-30 justify-self-end [writing-mode:vertical-rl] font-tgx10-sans text-[0.62rem] tracking-[0.22em] uppercase text-white px-1 py-3 [text-shadow:0_1px_6px_oklch(0.2_0.02_60/0.8)]">Words · Amara Chen</p>
    <div class="col-start-1 col-end-5 row-start-3 row-end-4 max-sm:col-end-13 border-t-[3px] border-tgx10-ink pt-3">
      <p class="font-tgx10-sans text-[0.86rem] leading-[1.6] text-tgx10-mut">A weekend spent entirely between Canal Saint-Martin and Gare de l'Est, on the theory that the best way to see a city is to refuse to cross it.</p>
    </div>
    <p class="col-start-1 col-end-9 row-start-4 row-end-5 max-sm:col-end-13 text-[0.98rem] leading-[1.72] [column-width:17rem] [column-gap:2rem] [column-rule:1px_solid_var(--color-tgx10-rule)] first-letter:float-left first-letter:text-[3.2em] first-letter:leading-[0.82] first-letter:pr-[0.12em] first-letter:font-bold first-letter:text-tgx10-rust">Arrondissements are an administrative fiction that tourists treat as a map, and for one weekend I decided to take the fiction seriously. Everything within a twenty-minute walk of the canal, nothing outside it: the same four cafés, the same bakery queue, the same bench by the lock. By Saturday evening the waiter had stopped asking. By Sunday I had opinions about which side of the water gets the better light, which is the point at which a neighbourhood stops being a destination and starts being somewhere you have been.</p>
  </article>
</section>
@import "tailwindcss";

@theme {
  --color-tgx10-paper: #f8f5ee;
  --color-tgx10-paper: oklch(0.97 0.008 85);
  --color-tgx10-shade: #e6e0d4;
  --color-tgx10-shade: oklch(0.9 0.012 85);
  --color-tgx10-ink: #2b2620;
  --color-tgx10-ink: oklch(0.24 0.01 60);
  --color-tgx10-mut: #574f45;
  --color-tgx10-mut: oklch(0.42 0.015 60);
  --color-tgx10-rule: #c4bcae;
  --color-tgx10-rule: oklch(0.79 0.015 80);
  --color-tgx10-rust: #a3512a;
  --color-tgx10-rust: oklch(0.53 0.15 40);
  --font-tgx10-serif: 'Fraunces', Georgia, serif;
  --font-tgx10-sans: 'Inter Tight', system-ui, sans-serif;
}

.tgx-10 {
  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-tgx10-paper: #f8f5ee;
  --color-tgx10-paper: oklch(0.97 0.008 85);
  --color-tgx10-shade: #e6e0d4;
  --color-tgx10-shade: oklch(0.9 0.012 85);
  --color-tgx10-ink: #2b2620;
  --color-tgx10-ink: oklch(0.24 0.01 60);
  --color-tgx10-mut: #574f45;
  --color-tgx10-mut: oklch(0.42 0.015 60);
  --color-tgx10-rule: #c4bcae;
  --color-tgx10-rule: oklch(0.79 0.015 80);
  --color-tgx10-rust: #a3512a;
  --color-tgx10-rust: oklch(0.53 0.15 40);
  --font-tgx10-serif: 'Fraunces', Georgia, serif;
  --font-tgx10-sans: 'Inter Tight', system-ui, sans-serif;
}

.tgx-10 {
  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=Fraunces:opsz,wght@9..144,400;9..144,700&family=Inter+Tight:wght@400;500&display=swap">

What changed in the port

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

  • With a real photograph the vertical byline needs its own shadow — a detail the gradient version could hide. Print layouts are full of these, and they only appear once the picture is real.
  • The drop cap is five utilities on the paragraph rather than a ::first-letter rule in a sheet, which is the clearest small win in the whole port.
  • Product upgrade: the abstract 'the grid was always a printing press' spread became a real travel feature with a dateline standfirst and a full column of copy, so the multi-column rule and the drop cap have something to act on.
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 Magazine Spread Layout with Overlapping Headline
Source: https://codefronts.com/layouts/tailwind-css-grid-layouts/tailwind-magazine-spread-layout-overlapping-headline/

A print-grade travel opener: the display headline crosses the photograph, a vertical byline runs up the gutter, the standfirst sits under a hairline rule and the body copy breaks into columns with a drop cap.
## HTML
```html
<section class="tgx-10 w-full min-h-svh bg-tgx10-paper text-tgx10-ink font-tgx10-serif px-6 py-10">
  <article class="grid grid-cols-12 grid-rows-[auto_auto_auto_1fr] gap-4 w-[min(700px,100%)] mx-auto">
    <figure class="col-start-5 col-end-13 row-start-1 row-end-4 max-sm:col-start-1 max-sm:row-end-2 z-10 overflow-hidden bg-tgx10-shade">
      <img src="https://images.unsplash.com/photo-1502602898657-3e91760cbb34?w=900&h=675&q=80&auto=format&fit=crop" alt="Parisian boulevard at dusk seen from a rooftop, lights coming on" loading="lazy" class="w-full h-full object-cover aspect-[4/3]">
    </figure>
    <h2 class="col-start-1 col-end-9 row-start-2 row-end-3 max-sm:col-end-13 z-20 text-[clamp(2rem,6vw,3.3rem)] leading-[1.02] font-bold tracking-[-0.015em] text-balance [text-shadow:0_0_18px_var(--color-tgx10-paper),0_0_6px_var(--color-tgx10-paper),2px_2px_0_var(--color-tgx10-paper)]">Forty hours in the tenth</h2>
    <p class="col-start-12 col-end-13 row-start-1 row-end-2 max-sm:hidden z-30 justify-self-end [writing-mode:vertical-rl] font-tgx10-sans text-[0.62rem] tracking-[0.22em] uppercase text-white px-1 py-3 [text-shadow:0_1px_6px_oklch(0.2_0.02_60/0.8)]">Words · Amara Chen</p>
    <div class="col-start-1 col-end-5 row-start-3 row-end-4 max-sm:col-end-13 border-t-[3px] border-tgx10-ink pt-3">
      <p class="font-tgx10-sans text-[0.86rem] leading-[1.6] text-tgx10-mut">A weekend spent entirely between Canal Saint-Martin and Gare de l'Est, on the theory that the best way to see a city is to refuse to cross it.</p>
    </div>
    <p class="col-start-1 col-end-9 row-start-4 row-end-5 max-sm:col-end-13 text-[0.98rem] leading-[1.72] [column-width:17rem] [column-gap:2rem] [column-rule:1px_solid_var(--color-tgx10-rule)] first-letter:float-left first-letter:text-[3.2em] first-letter:leading-[0.82] first-letter:pr-[0.12em] first-letter:font-bold first-letter:text-tgx10-rust">Arrondissements are an administrative fiction that tourists treat as a map, and for one weekend I decided to take the fiction seriously. Everything within a twenty-minute walk of the canal, nothing outside it: the same four cafés, the same bakery queue, the same bench by the lock. By Saturday evening the waiter had stopped asking. By Sunday I had opinions about which side of the water gets the better light, which is the point at which a neighbourhood stops being a destination and starts being somewhere you have been.</p>
  </article>
</section>
```
## CSS
```css
@import "tailwindcss";

@theme {
  --color-tgx10-paper: #f8f5ee;
  --color-tgx10-paper: oklch(0.97 0.008 85);
  --color-tgx10-shade: #e6e0d4;
  --color-tgx10-shade: oklch(0.9 0.012 85);
  --color-tgx10-ink: #2b2620;
  --color-tgx10-ink: oklch(0.24 0.01 60);
  --color-tgx10-mut: #574f45;
  --color-tgx10-mut: oklch(0.42 0.015 60);
  --color-tgx10-rule: #c4bcae;
  --color-tgx10-rule: oklch(0.79 0.015 80);
  --color-tgx10-rust: #a3512a;
  --color-tgx10-rust: oklch(0.53 0.15 40);
  --font-tgx10-serif: 'Fraunces', Georgia, serif;
  --font-tgx10-sans: 'Inter Tight', system-ui, sans-serif;
}

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

How this works

The crossing is placement. Three utilities per layer and the shared columns do the rest — no absolute offsets to re-tune at every breakpoint.

Type carries the other half. clamp() display sizing, balanced ragging, a drop cap, and column rules on the body — the reason the spread reads as designed rather than templated.

Make it yours

  • Mirror the spread by flipping every line number.
  • Re-tune first-letter:leading-* whenever you change the serif — cap heights differ.
  • Deepen the crossing by extending the headline's col-end.

Gotchas — read before shipping

  • Where the headline crosses the photo it needs a scrim; the layered text-shadow is load-bearing, not decoration.
  • vertical-rl does not wrap gracefully — keep the byline short, and hide it below sm.
  • Browsers cap text-wrap: balance at a handful of lines; it is for headlines, not body copy.

Browser support

ChromeSafariFirefoxEdge
111+16.4+128+111+

text-wrap: balance degrades to normal ragging; overlap, writing-mode and ::first-letter work back to 2017.

Techniques used in this demo

Utilitiesfirst-class utility or variant

Search CodeFronts

Loading…