31 Tailwind CSS Hero Sections
20 / 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

Animated Gradient Text Hero Section in Tailwind CSS

An oversized headline with a marigold → ruby → grape gradient sweeping through two words, over a plum spotlight — plus a real inline waitlist form (email + button) instead of a lone link. The Linear / Apple shimmer, made useful.

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-20 grid w-full min-h-svh place-items-center bg-ths20-bg bg-[radial-gradient(60%_60%_at_50%_0%,var(--color-ths20-glow),transparent_70%)] px-5 py-16 font-ths20-sans text-ths20-cream sm:px-14" aria-label="Animated gradient text hero">
  <div class="max-w-[48rem] text-center">
    <span class="inline-flex items-center gap-2 rounded-full border border-ths20-amber/40 px-3 py-1 font-ths20-mono text-[11px] tracking-[0.16em] text-ths20-amber uppercase"><span aria-hidden="true" class="size-1.5 animate-pulse rounded-full bg-ths20-amber"></span>v3 launching Tuesday</span>
    <h1 class="mt-6 font-ths20-display text-[clamp(42px,6.8vw,80px)] leading-[1.02] font-extrabold tracking-[-0.03em] text-balance">Made for the way <span class="box-decoration-clone animate-ths20-sweep bg-[linear-gradient(90deg,var(--color-ths20-amber),var(--color-ths20-ruby),var(--color-ths20-grape),var(--color-ths20-amber))] bg-size-[200%_100%] bg-clip-text text-transparent motion-reduce:animate-none">creative people</span> actually work.</h1>
    <p class="mx-auto mt-6 max-w-[30rem] text-lg/relaxed text-ths20-mut">One canvas. Every layer. Zero exporting between apps to nudge a kerning pair.</p>
    <form action="#waitlist" class="mx-auto mt-9 flex max-w-md flex-col gap-2 rounded-3xl border border-white/12 bg-white/6 p-1.5 focus-within:ring-2 focus-within:ring-ths20-amber sm:flex-row sm:rounded-full">
      <label for="ths20-email" class="sr-only">Email address</label>
      <input id="ths20-email" type="email" required autocomplete="email" placeholder="you@studio.com" class="min-h-12 flex-1 rounded-full bg-transparent px-5 text-[15px] text-ths20-cream placeholder:text-ths20-mut/80 focus:outline-none">
      <button type="submit" class="min-h-12 rounded-full bg-linear-to-r from-ths20-amber to-ths20-ruby px-6 text-[15px] font-bold text-ths20-bg shadow-[0_12px_30px_rgb(214_58_94/0.35)] transition hover:brightness-110 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white motion-reduce:transition-none">Join the waitlist</button>
    </form>
    <p class="mt-4 text-xs text-ths20-mut">4,812 designers ahead of you · no spam, one email at launch</p>
  </div>
</section>
@import "tailwindcss";

@theme {
  --color-ths20-bg: #1a0d20;
  --color-ths20-bg: oklch(0.188 0.042 314.4);
  --color-ths20-glow: #4a1a3e;
  --color-ths20-glow: oklch(0.306 0.088 338.4);
  --color-ths20-cream: #f4e8d0;
  --color-ths20-cream: oklch(0.934 0.034 84.6);
  --color-ths20-mut: #c4b49c;
  --color-ths20-mut: oklch(0.777 0.038 78);
  --color-ths20-amber: #f5b148;
  --color-ths20-amber: oklch(0.806 0.142 74.7);
  --color-ths20-ruby: #e0466a;
  --color-ths20-ruby: oklch(0.621 0.19 10.9);
  --color-ths20-grape: #a052b8;
  --color-ths20-grape: oklch(0.574 0.168 317.7);
  --font-ths20-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-ths20-sans: 'Geist', system-ui, sans-serif;
  --font-ths20-mono: 'JetBrains Mono', ui-monospace, monospace;
  --animate-ths20-sweep: ths20-sweep 4s linear infinite;

  @keyframes ths20-sweep {
    to {
      background-position: 200% 0;
    }
  }
}
/* 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-20 {
  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-ths20-bg: #1a0d20;
  --color-ths20-bg: oklch(0.188 0.042 314.4);
  --color-ths20-glow: #4a1a3e;
  --color-ths20-glow: oklch(0.306 0.088 338.4);
  --color-ths20-cream: #f4e8d0;
  --color-ths20-cream: oklch(0.934 0.034 84.6);
  --color-ths20-mut: #c4b49c;
  --color-ths20-mut: oklch(0.777 0.038 78);
  --color-ths20-amber: #f5b148;
  --color-ths20-amber: oklch(0.806 0.142 74.7);
  --color-ths20-ruby: #e0466a;
  --color-ths20-ruby: oklch(0.621 0.19 10.9);
  --color-ths20-grape: #a052b8;
  --color-ths20-grape: oklch(0.574 0.168 317.7);
  --font-ths20-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-ths20-sans: 'Geist', system-ui, sans-serif;
  --font-ths20-mono: 'JetBrains Mono', ui-monospace, monospace;
  --animate-ths20-sweep: ths20-sweep 4s linear infinite;

  @keyframes ths20-sweep {
    to {
      background-position: 200% 0;
    }
  }
}
/* 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-20 {
  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=Bricolage+Grotesque:opsz,wght@12..96,500..800&family=Geist:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">

What changed in the port

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

  • The shine rule's five declarations became five utilities; background-size uses v4's bg-size-[…].
  • UI upgrade from the CSS original: the grape stop #7e2d8a nearly vanished on the plum background; it is now #a052b8, and box-decoration-clone keeps the gradient whole when the phrase wraps.
  • UI upgrade: an inline, accessible email form replaces the bare link, with a social-proof line beneath and a pulsing launch dot.
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: Animated Gradient Text Hero Section in Tailwind CSS
Source: https://codefronts.com/layouts/tailwind-css-hero-sections/tailwind-animated-gradient-text-hero-section/

An oversized headline with a marigold → ruby → grape gradient sweeping through two words, over a plum spotlight — plus a real inline waitlist form (email + button) instead of a lone link. The Linear / Apple shimmer, made useful.
## HTML
```html
<section class="ths-20 grid w-full min-h-svh place-items-center bg-ths20-bg bg-[radial-gradient(60%_60%_at_50%_0%,var(--color-ths20-glow),transparent_70%)] px-5 py-16 font-ths20-sans text-ths20-cream sm:px-14" aria-label="Animated gradient text hero">
  <div class="max-w-[48rem] text-center">
    <span class="inline-flex items-center gap-2 rounded-full border border-ths20-amber/40 px-3 py-1 font-ths20-mono text-[11px] tracking-[0.16em] text-ths20-amber uppercase"><span aria-hidden="true" class="size-1.5 animate-pulse rounded-full bg-ths20-amber"></span>v3 launching Tuesday</span>
    <h1 class="mt-6 font-ths20-display text-[clamp(42px,6.8vw,80px)] leading-[1.02] font-extrabold tracking-[-0.03em] text-balance">Made for the way <span class="box-decoration-clone animate-ths20-sweep bg-[linear-gradient(90deg,var(--color-ths20-amber),var(--color-ths20-ruby),var(--color-ths20-grape),var(--color-ths20-amber))] bg-size-[200%_100%] bg-clip-text text-transparent motion-reduce:animate-none">creative people</span> actually work.</h1>
    <p class="mx-auto mt-6 max-w-[30rem] text-lg/relaxed text-ths20-mut">One canvas. Every layer. Zero exporting between apps to nudge a kerning pair.</p>
    <form action="#waitlist" class="mx-auto mt-9 flex max-w-md flex-col gap-2 rounded-3xl border border-white/12 bg-white/6 p-1.5 focus-within:ring-2 focus-within:ring-ths20-amber sm:flex-row sm:rounded-full">
      <label for="ths20-email" class="sr-only">Email address</label>
      <input id="ths20-email" type="email" required autocomplete="email" placeholder="you@studio.com" class="min-h-12 flex-1 rounded-full bg-transparent px-5 text-[15px] text-ths20-cream placeholder:text-ths20-mut/80 focus:outline-none">
      <button type="submit" class="min-h-12 rounded-full bg-linear-to-r from-ths20-amber to-ths20-ruby px-6 text-[15px] font-bold text-ths20-bg shadow-[0_12px_30px_rgb(214_58_94/0.35)] transition hover:brightness-110 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white motion-reduce:transition-none">Join the waitlist</button>
    </form>
    <p class="mt-4 text-xs text-ths20-mut">4,812 designers ahead of you · no spam, one email at launch</p>
  </div>
</section>
```
## CSS
```css
@import "tailwindcss";

@theme {
  --color-ths20-bg: #1a0d20;
  --color-ths20-bg: oklch(0.188 0.042 314.4);
  --color-ths20-glow: #4a1a3e;
  --color-ths20-glow: oklch(0.306 0.088 338.4);
  --color-ths20-cream: #f4e8d0;
  --color-ths20-cream: oklch(0.934 0.034 84.6);
  --color-ths20-mut: #c4b49c;
  --color-ths20-mut: oklch(0.777 0.038 78);
  --color-ths20-amber: #f5b148;
  --color-ths20-amber: oklch(0.806 0.142 74.7);
  --color-ths20-ruby: #e0466a;
  --color-ths20-ruby: oklch(0.621 0.19 10.9);
  --color-ths20-grape: #a052b8;
  --color-ths20-grape: oklch(0.574 0.168 317.7);
  --font-ths20-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-ths20-sans: 'Geist', system-ui, sans-serif;
  --font-ths20-mono: 'JetBrains Mono', ui-monospace, monospace;
  --animate-ths20-sweep: ths20-sweep 4s linear infinite;

  @keyframes ths20-sweep {
    to {
      background-position: 200% 0;
    }
  }
}
/* 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-20 {
  width: 100%;
  min-height: 100svh;
}
```

How this works

Sweep the background, not the text. The gradient is twice the element's width and its background-position animates from 0 to 200%; because the first and last stops match, the loop is seamless.

A form beats a link. Join the waitlist used to send people elsewhere. The pill form collects the email in place; focus-within: draws the focus ring around the whole control.

Make it yours

  • Static gradient: drop animate-ths20-sweep.
  • Change the gradient stops in the bg-[linear-gradient(…)] utility — keep first and last equal.
  • Wire the form action to your provider.

Gotchas — read before shipping

  • Inline elements wrap the gradient per line; box-decoration-clone keeps each line's gradient whole.
  • The submit button needs a text label, not just an arrow icon.

Browser support

ChromeSafariFirefoxEdge
111+16.4+128+111+

background-clip:text is universal; Tailwind prefixes it.

Techniques used in this demo

Utilitiesfirst-class utility or variant

Plain CSSno Tailwind surface

Search CodeFronts

Loading…