30 Tailwind CSS Grid Layouts
22 / 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 Asymmetric Poster Hero with Layered Grid Regions

A conference hero built like a printed poster: a crimson slab, an offset cream panel, an outlined year bleeding off the top edge and the headline straddling both — four layers, one grid, zero absolute positioning.

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-22 w-full min-h-svh bg-tgx22-ink font-tgx22-sans p-6 grid place-items-center">
  <div class="grid grid-cols-10 grid-rows-[repeat(7,minmax(34px,auto))] w-[min(660px,100%)] overflow-hidden">
    <div aria-hidden="true" class="col-start-1 col-end-6 row-start-1 row-end-5 z-10 bg-tgx22-crimson"></div>
    <div aria-hidden="true" class="col-start-4 col-end-11 row-start-2 row-end-8 z-20 bg-tgx22-cream"></div>
    <span aria-hidden="true" class="col-start-7 col-end-11 row-start-1 row-end-4 max-sm:col-start-6 z-30 justify-self-end translate-x-[6%] -translate-y-[12%] text-[clamp(4.5rem,15vw,8.5rem)] font-black leading-[0.75] text-transparent [-webkit-text-stroke:2px_var(--color-tgx22-crimson)]">26</span>
    <div class="col-start-2 col-end-9 row-start-3 row-end-5 max-sm:col-end-10 z-40 self-center flex flex-col gap-2">
      <p class="font-tgx22-mono text-[0.68rem] tracking-[0.18em] uppercase text-tgx22-crimson">Layout Conf · Rotterdam</p>
      <h2 class="text-[clamp(1.7rem,5vw,2.8rem)] leading-[1.02] font-extrabold tracking-[-0.02em] text-tgx22-ink">Balance is<br>overrated</h2>
    </div>
    <div class="col-start-4 col-end-11 row-start-6 row-end-8 z-40 self-end flex items-end justify-between gap-4 flex-wrap p-4">
      <dl class="flex gap-6">
        <div><dt class="text-[0.6rem] uppercase tracking-[0.12em] text-tgx22-caption">Dates</dt><dd class="text-[0.86rem] font-semibold text-tgx22-ink tabular-nums">14–16 Nov</dd></div>
        <div><dt class="text-[0.6rem] uppercase tracking-[0.12em] text-tgx22-caption">Talks</dt><dd class="text-[0.86rem] font-semibold text-tgx22-ink tabular-nums">24</dd></div>
        <div class="max-sm:hidden"><dt class="text-[0.6rem] uppercase tracking-[0.12em] text-tgx22-caption">Tickets</dt><dd class="text-[0.86rem] font-semibold text-tgx22-ink">€240</dd></div>
      </dl>
      <a href="#0" class="inline-flex items-center min-h-11 px-5 rounded-full bg-tgx22-crimson text-white text-[0.84rem] font-semibold no-underline transition-colors hover:bg-tgx22-crimsondark focus-visible:outline-2 focus-visible:outline-tgx22-crimson focus-visible:outline-offset-2">Get a ticket</a>
    </div>
  </div>
</section>
@import "tailwindcss";

@theme {
  --color-tgx22-crimson: #b53821;
  --color-tgx22-crimson: oklch(0.52 0.19 30);
  --color-tgx22-crimsondark: #97291a;
  --color-tgx22-crimsondark: oklch(0.44 0.17 30);
  --color-tgx22-cream: #f3ece0;
  --color-tgx22-cream: oklch(0.95 0.02 85);
  --color-tgx22-ink: #241a17;
  --color-tgx22-ink: oklch(0.22 0.02 30);
  --color-tgx22-caption: #5c4b44;
  --color-tgx22-caption: oklch(0.43 0.02 40);
  --font-tgx22-sans: 'Inter Tight', system-ui, sans-serif;
  --font-tgx22-mono: 'JetBrains Mono', ui-monospace, monospace;
}

.tgx-22 {
  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-tgx22-crimson: #b53821;
  --color-tgx22-crimson: oklch(0.52 0.19 30);
  --color-tgx22-crimsondark: #97291a;
  --color-tgx22-crimsondark: oklch(0.44 0.17 30);
  --color-tgx22-cream: #f3ece0;
  --color-tgx22-cream: oklch(0.95 0.02 85);
  --color-tgx22-ink: #241a17;
  --color-tgx22-ink: oklch(0.22 0.02 30);
  --color-tgx22-caption: #5c4b44;
  --color-tgx22-caption: oklch(0.43 0.02 40);
  --font-tgx22-sans: 'Inter Tight', system-ui, sans-serif;
  --font-tgx22-mono: 'JetBrains Mono', ui-monospace, monospace;
}

.tgx-22 {
  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="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@500;600;800;900&family=JetBrains+Mono:wght@500&display=swap">

What changed in the port

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

  • The fifth region is now a real footer row with dates, talk count and a ticket CTA — which proves the point better than a caption did: layers can hold interactive UI, not just type.
  • The outlined year reads the crimson token through var(), so a palette change carries the stroke with it.
  • Product upgrade: a poster that said 'four layers · one grid' became an actual conference hero with a kicker, a definition list and a ticket button, all still placed by line numbers.
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 Asymmetric Poster Hero with Layered Grid Regions
Source: https://codefronts.com/layouts/tailwind-css-grid-layouts/tailwind-asymmetric-poster-hero-layered-grid-regions/

A conference hero built like a printed poster: a crimson slab, an offset cream panel, an outlined year bleeding off the top edge and the headline straddling both — four layers, one grid, zero absolute positioning.
## HTML
```html
<section class="tgx-22 w-full min-h-svh bg-tgx22-ink font-tgx22-sans p-6 grid place-items-center">
  <div class="grid grid-cols-10 grid-rows-[repeat(7,minmax(34px,auto))] w-[min(660px,100%)] overflow-hidden">
    <div aria-hidden="true" class="col-start-1 col-end-6 row-start-1 row-end-5 z-10 bg-tgx22-crimson"></div>
    <div aria-hidden="true" class="col-start-4 col-end-11 row-start-2 row-end-8 z-20 bg-tgx22-cream"></div>
    <span aria-hidden="true" class="col-start-7 col-end-11 row-start-1 row-end-4 max-sm:col-start-6 z-30 justify-self-end translate-x-[6%] -translate-y-[12%] text-[clamp(4.5rem,15vw,8.5rem)] font-black leading-[0.75] text-transparent [-webkit-text-stroke:2px_var(--color-tgx22-crimson)]">26</span>
    <div class="col-start-2 col-end-9 row-start-3 row-end-5 max-sm:col-end-10 z-40 self-center flex flex-col gap-2">
      <p class="font-tgx22-mono text-[0.68rem] tracking-[0.18em] uppercase text-tgx22-crimson">Layout Conf · Rotterdam</p>
      <h2 class="text-[clamp(1.7rem,5vw,2.8rem)] leading-[1.02] font-extrabold tracking-[-0.02em] text-tgx22-ink">Balance is<br>overrated</h2>
    </div>
    <div class="col-start-4 col-end-11 row-start-6 row-end-8 z-40 self-end flex items-end justify-between gap-4 flex-wrap p-4">
      <dl class="flex gap-6">
        <div><dt class="text-[0.6rem] uppercase tracking-[0.12em] text-tgx22-caption">Dates</dt><dd class="text-[0.86rem] font-semibold text-tgx22-ink tabular-nums">14–16 Nov</dd></div>
        <div><dt class="text-[0.6rem] uppercase tracking-[0.12em] text-tgx22-caption">Talks</dt><dd class="text-[0.86rem] font-semibold text-tgx22-ink tabular-nums">24</dd></div>
        <div class="max-sm:hidden"><dt class="text-[0.6rem] uppercase tracking-[0.12em] text-tgx22-caption">Tickets</dt><dd class="text-[0.86rem] font-semibold text-tgx22-ink">€240</dd></div>
      </dl>
      <a href="#0" class="inline-flex items-center min-h-11 px-5 rounded-full bg-tgx22-crimson text-white text-[0.84rem] font-semibold no-underline transition-colors hover:bg-tgx22-crimsondark focus-visible:outline-2 focus-visible:outline-tgx22-crimson focus-visible:outline-offset-2">Get a ticket</a>
    </div>
  </div>
</section>
```
## CSS
```css
@import "tailwindcss";

@theme {
  --color-tgx22-crimson: #b53821;
  --color-tgx22-crimson: oklch(0.52 0.19 30);
  --color-tgx22-crimsondark: #97291a;
  --color-tgx22-crimsondark: oklch(0.44 0.17 30);
  --color-tgx22-cream: #f3ece0;
  --color-tgx22-cream: oklch(0.95 0.02 85);
  --color-tgx22-ink: #241a17;
  --color-tgx22-ink: oklch(0.22 0.02 30);
  --color-tgx22-caption: #5c4b44;
  --color-tgx22-caption: oklch(0.43 0.02 40);
  --font-tgx22-sans: 'Inter Tight', system-ui, sans-serif;
  --font-tgx22-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

How this works

Placement arithmetic is the art direction. Slab 1–6 / 1–5, panel 4–11 / 2–7, numeral 7–11 / 1–4, headline 2–9 / 3–5. Nudge any number and the layers renegotiate — no offsets to re-tune.

The headline gets a stable ground. Crossing a layer boundary is a contrast problem, solved here by pinning the type over the cream panel rather than hoping a shadow rescues it.

Make it yours

  • Rebalance by nudging any layer's line numbers.
  • Swap the numeral for a logo or a photo cutout at the same coordinates.
  • Invert the palette for a second campaign look — cream slab, crimson panel.

Gotchas — read before shipping

  • Off-canvas bleed needs overflow-hidden on the SECTION; on body it breaks sticky elsewhere.
  • -webkit-text-stroke is prefixed in every engine — ship an SVG fallback if the outline is brand-critical.
  • Check contrast wherever a layer boundary crosses type.

Browser support

ChromeSafariFirefoxEdge
111+16.4+128+111+

Layout is original grid; -webkit-text-stroke works prefixed in all evergreens.

Techniques used in this demo

Arbitraryneeds bracket syntax

Search CodeFronts

Loading…