31 Tailwind CSS Hero Sections
13 / 31

All 31 in 31 Tailwind CSS Hero Sections

  1. 01Centered Hero Section in Tailwind CSS with Serif Headline & Dual CTA
  2. 02Tailwind CSS Split Hero Section with Dashboard Mockup
  3. 03Tailwind CSS Animated Gradient Mesh Hero Section
  4. 04Glassmorphism Hero Section in Tailwind CSS with Aurora Background
  5. 05Tailwind CSS Developer Hero Section with Terminal Window
  6. 06Tailwind Hero Section with Animated Geometric Shapes Background
  7. 07Tailwind CSS Hero Section with Star Rating & Logo Cloud
  8. 08Tailwind CSS Animated Headline Hero with Staggered Word Reveal
  9. 09Before and After Image Comparison Slider Hero in Tailwind CSS
  10. 10Full-Screen Tailwind Hero with Animated Scroll Down Indicator
  11. 11Magazine Cover Hero Section in Tailwind CSS
  12. 12Asymmetric Typography Hero Section in Tailwind CSS
  13. 13Tailwind CSS Hero Section with Oversized Background Number
  14. 14Infinite Scrolling Marquee Hero Section in Tailwind CSS
  15. 15Tailwind CSS Hero Section with Image & Overlay Card
  16. 16Brutalist Hero Section in Tailwind CSS
  17. 17Vertical Text Hero Section in Tailwind CSS (Japanese Writing Mode)
  18. 18Kinetic Typography Hero in Tailwind CSS with Animated Letters
  19. 19Bento Grid Hero Section in Tailwind CSS
  20. 20Animated Gradient Text Hero Section in Tailwind CSS
  21. 21Tailwind CSS Product Hero with Floating Feature Badges
  22. 22Tailwind CSS Hero Section with Pricing Card
  23. 23Mobile App Landing Page Hero in Tailwind CSS with App Store Buttons
  24. 24Neon Glow Hero Section in Tailwind CSS (Cyberpunk)
  25. 25Parallax Mountain Landscape Hero in Tailwind CSS
  26. 26Isometric Illustration Hero Section in Tailwind CSS
  27. 273D Card Stack Hero in Tailwind CSS with Hover Fan-Out
  28. 28Animated Starfield Background Hero in Tailwind CSS
  29. 29Glitch Text Effect Hero Section in Tailwind CSS
  30. 30Animated Conic Gradient Ring Hero in Tailwind CSS
  31. 31Mouse-Tracking Liquid Glass Lens Hero in Tailwind CSS
Pure TailwindMIT licensed

Tailwind CSS Hero Section with Oversized Background Number

A vintage wine-label poster — a colossal 1924 drawn as a fading gold-to-burgundy outline behind italic serif copy, with a ruled tasting strip and a ghost CTA. Cream paper, gold-leaf accents, a century of quiet.

Live Demo
Plain CSSTailwind v4
Try it

Complete Tailwind CSS landing page templates in HTML, React, Next.js and Vue · from $49

Cruip · Affiliate link

Browse Cruip templates

The code

<section class="ths-13 relative isolate grid w-full min-h-svh place-items-center overflow-hidden bg-ths13-bg bg-[radial-gradient(70%_60%_at_50%_45%,var(--color-ths13-glow),transparent_75%)] px-5 py-16 font-ths13-serif text-ths13-ink sm:px-14" aria-label="Hero with oversized background number">
  <div aria-hidden="true" class="pointer-events-none absolute top-1/2 left-1/2 -z-10 -translate-1/2 bg-linear-to-b from-ths13-wine/15 to-transparent to-80% bg-clip-text text-[clamp(220px,40vw,520px)] leading-none font-black tracking-[-0.03em] text-transparent select-none [-webkit-text-stroke:1.5px_rgb(156_122_42/0.45)]">1924</div>
  <div class="max-w-[38rem] text-center">
    <span class="font-ths13-body text-lg tracking-[0.08em] text-ths13-gold italic">— Estate · Vinifera ·</span>
    <h1 class="mt-4 text-[clamp(40px,6.4vw,70px)] leading-[1.03] font-semibold text-balance">A century of <em class="text-ths13-wine">quiet wines.</em></h1>
    <p class="mx-auto mt-5 max-w-[28rem] font-ths13-body text-xl/relaxed text-ths13-mut italic">Six grapes. Four hectares. One family that still skips the marketing and lets the vintage speak.</p>
    <a href="#cellar" class="mt-8 inline-flex min-h-12 items-center border-[1.5px] border-ths13-wine px-8 font-ths13-mono text-xs font-bold tracking-[0.16em] text-ths13-wine uppercase transition hover:bg-ths13-wine hover:text-ths13-bg focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-ths13-wine motion-reduce:transition-none">Visit the cellar</a>
    <dl class="mx-auto mt-10 grid max-w-md grid-cols-3 divide-x divide-ths13-gold/50 border-y border-ths13-gold/50 py-4 font-ths13-mono text-[11px] tracking-[0.12em] text-ths13-mut uppercase">
      <div><dt>Founded</dt><dd class="mt-1 font-ths13-serif text-lg tracking-normal text-ths13-ink normal-case">1924</dd></div>
      <div><dt>Region</dt><dd class="mt-1 font-ths13-serif text-lg tracking-normal text-ths13-ink normal-case">Douro</dd></div>
      <div><dt>Grapes</dt><dd class="mt-1 font-ths13-serif text-lg tracking-normal text-ths13-ink normal-case">Six</dd></div>
    </dl>
  </div>
</section>
@import "tailwindcss";

@theme {
  --color-ths13-bg: #f5ebd4;
  --color-ths13-bg: oklch(0.942 0.032 87.3);
  --color-ths13-glow: #fbf5e6;
  --color-ths13-glow: oklch(0.971 0.021 88.7);
  --color-ths13-ink: #2a0a18;
  --color-ths13-ink: oklch(0.205 0.056 356);
  --color-ths13-mut: #5a3848;
  --color-ths13-mut: oklch(0.387 0.054 350.2);
  --color-ths13-wine: #6b1230;
  --color-ths13-wine: oklch(0.351 0.123 6.7);
  --color-ths13-gold: #9c7a2a;
  --color-ths13-gold: oklch(0.598 0.105 85.1);
  --font-ths13-serif: 'Playfair Display', Georgia, serif;
  --font-ths13-body: 'Cormorant Garamond', Georgia, serif;
  --font-ths13-mono: 'JetBrains Mono', ui-monospace, monospace;
}
/* Root rule: the full-bleed contract, stated in CSS as well as in the markup's utilities, so the
   stage is sized before the browser build compiles. */

.ths-13 {
  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-ths13-bg: #f5ebd4;
  --color-ths13-bg: oklch(0.942 0.032 87.3);
  --color-ths13-glow: #fbf5e6;
  --color-ths13-glow: oklch(0.971 0.021 88.7);
  --color-ths13-ink: #2a0a18;
  --color-ths13-ink: oklch(0.205 0.056 356);
  --color-ths13-mut: #5a3848;
  --color-ths13-mut: oklch(0.387 0.054 350.2);
  --color-ths13-wine: #6b1230;
  --color-ths13-wine: oklch(0.351 0.123 6.7);
  --color-ths13-gold: #9c7a2a;
  --color-ths13-gold: oklch(0.598 0.105 85.1);
  --font-ths13-serif: 'Playfair Display', Georgia, serif;
  --font-ths13-body: 'Cormorant Garamond', Georgia, serif;
  --font-ths13-mono: 'JetBrains Mono', ui-monospace, monospace;
}
/* Root rule: the full-bleed contract, stated in CSS as well as in the markup's utilities, so the
   stage is sized before the browser build compiles. */

.ths-13 {
  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=Playfair+Display:ital,wght@0,600;0,900;1,600&family=Cormorant+Garamond:ital,wght@1,500&family=JetBrains+Mono:wght@500;700&display=swap">

What changed in the port

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

  • transform: translate(-50%,-50%) became -translate-1/2, v4's two-axis shorthand.
  • UI upgrade from the CSS original: the flat 12%-opacity numeral became an engraved gold outline over a fading burgundy fill — far more premium, and it no longer muddies the copy.
  • UI upgrade: a ruled tasting strip adds the facts wine buyers look for; the gold eyebrow deepened from #c69e3d (2.2:1) to #9c7a2a (3.6:1 at headline scale).
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 CSS Hero Section with Oversized Background Number
Source: https://codefronts.com/layouts/tailwind-css-hero-sections/tailwind-hero-section-oversized-background-number/

A vintage wine-label poster — a colossal 1924 drawn as a fading gold-to-burgundy outline behind italic serif copy, with a ruled tasting strip and a ghost CTA. Cream paper, gold-leaf accents, a century of quiet.
## HTML
```html
<section class="ths-13 relative isolate grid w-full min-h-svh place-items-center overflow-hidden bg-ths13-bg bg-[radial-gradient(70%_60%_at_50%_45%,var(--color-ths13-glow),transparent_75%)] px-5 py-16 font-ths13-serif text-ths13-ink sm:px-14" aria-label="Hero with oversized background number">
  <div aria-hidden="true" class="pointer-events-none absolute top-1/2 left-1/2 -z-10 -translate-1/2 bg-linear-to-b from-ths13-wine/15 to-transparent to-80% bg-clip-text text-[clamp(220px,40vw,520px)] leading-none font-black tracking-[-0.03em] text-transparent select-none [-webkit-text-stroke:1.5px_rgb(156_122_42/0.45)]">1924</div>
  <div class="max-w-[38rem] text-center">
    <span class="font-ths13-body text-lg tracking-[0.08em] text-ths13-gold italic">— Estate · Vinifera ·</span>
    <h1 class="mt-4 text-[clamp(40px,6.4vw,70px)] leading-[1.03] font-semibold text-balance">A century of <em class="text-ths13-wine">quiet wines.</em></h1>
    <p class="mx-auto mt-5 max-w-[28rem] font-ths13-body text-xl/relaxed text-ths13-mut italic">Six grapes. Four hectares. One family that still skips the marketing and lets the vintage speak.</p>
    <a href="#cellar" class="mt-8 inline-flex min-h-12 items-center border-[1.5px] border-ths13-wine px-8 font-ths13-mono text-xs font-bold tracking-[0.16em] text-ths13-wine uppercase transition hover:bg-ths13-wine hover:text-ths13-bg focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-ths13-wine motion-reduce:transition-none">Visit the cellar</a>
    <dl class="mx-auto mt-10 grid max-w-md grid-cols-3 divide-x divide-ths13-gold/50 border-y border-ths13-gold/50 py-4 font-ths13-mono text-[11px] tracking-[0.12em] text-ths13-mut uppercase">
      <div><dt>Founded</dt><dd class="mt-1 font-ths13-serif text-lg tracking-normal text-ths13-ink normal-case">1924</dd></div>
      <div><dt>Region</dt><dd class="mt-1 font-ths13-serif text-lg tracking-normal text-ths13-ink normal-case">Douro</dd></div>
      <div><dt>Grapes</dt><dd class="mt-1 font-ths13-serif text-lg tracking-normal text-ths13-ink normal-case">Six</dd></div>
    </dl>
  </div>
</section>
```
## CSS
```css
@import "tailwindcss";

@theme {
  --color-ths13-bg: #f5ebd4;
  --color-ths13-bg: oklch(0.942 0.032 87.3);
  --color-ths13-glow: #fbf5e6;
  --color-ths13-glow: oklch(0.971 0.021 88.7);
  --color-ths13-ink: #2a0a18;
  --color-ths13-ink: oklch(0.205 0.056 356);
  --color-ths13-mut: #5a3848;
  --color-ths13-mut: oklch(0.387 0.054 350.2);
  --color-ths13-wine: #6b1230;
  --color-ths13-wine: oklch(0.351 0.123 6.7);
  --color-ths13-gold: #9c7a2a;
  --color-ths13-gold: oklch(0.598 0.105 85.1);
  --font-ths13-serif: 'Playfair Display', Georgia, serif;
  --font-ths13-body: 'Cormorant Garamond', Georgia, serif;
  --font-ths13-mono: 'JetBrains Mono', ui-monospace, monospace;
}
/* Root rule: the full-bleed contract, stated in CSS as well as in the markup's utilities, so the
   stage is sized before the browser build compiles. */

.ths-13 {
  width: 100%;
  min-height: 100svh;
}
```

How this works

Outline plus fade. The original drew the year at 12% opacity — muddy on cream. Here a vertical gradient from burgundy/20 to transparent is clipped to the glyphs, and a thin gold stroke traces every edge, so the number reads as an engraving rather than a smudge.

Centring a decorative layer. absolute top-1/2 left-1/2 -translate-1/2 pins the numeral; select-none pointer-events-none keep it out of the way.

Make it yours

  • Change the year and the tasting strip together.
  • Solid numeral: replace the gradient with text-ths13-wine/10 and drop the stroke.
  • Swap to a sans numeral (font-ths13-sans) for a modern spirits brand.

Gotchas — read before shipping

  • bg-clip-text needs text-transparent or the fill hides the gradient.
  • Very large text can trigger horizontal scroll — the root keeps overflow-hidden.

Browser support

ChromeSafariFirefoxEdge
111+16.4+128+111+

background-clip:text is universal; Tailwind adds the prefix.

Techniques used in this demo

Utilitiesfirst-class utility or variant

Arbitraryneeds bracket syntax

Search CodeFronts

Loading…