Skip to content

Centered Hero with Announcement Badge

Dark Tailwind CSS hero section with an announcement pill, gradient headline, two CTA buttons, glowing grid background and a row of trust logos.

Also known as: saas hero section, landing page header, hero with announcement banner, centered hero

Tailwind CSS Hero Sections Responsive Dark #cta #dark #hero #landing #responsive

Centered Hero with Announcement Badge live demo

Open in new tab

Tailwind CSS code (HTML, CSS)

A dark, centered hero section built with Tailwind CSS: an announcement pill on top, a large headline with a gradient phrase, a short supporting paragraph, two call-to-action buttons and a row of customer logos. It is a common first screen for SaaS landing pages, product launches and app websites. No JavaScript is needed.

How it works

The root is a section with the class .thc-hero, using relative isolate overflow-hidden so the decorative layers stay inside it. Two absolutely positioned layers sit behind the content with -z-10. .thc-grid draws a faint square grid from two linear-gradient backgrounds and fades it out with a radial mask-image. .thc-glow is a blurred pair of radial gradients in fuchsia and orange that slowly "breathes" through the thc-breathe keyframes.

The content column is limited to max-w-3xl and centered. The announcement pill is a single link containing a "New" label, the message and an arrow that nudges right on hover through the group-hover:translate-x-0.5 utility. The h1 uses text-balance for even line breaks, and its second line is painted with bg-linear-to-r plus bg-clip-text text-transparent. The CTAs stack full width on phones and sit side by side from the sm breakpoint. The logo row is a wrapping flex list of inline SVG marks and wordmarks; .thc-logo keeps them muted at 70% opacity and brightens each one on hover.

Customization

  • --thc-glow-a and --thc-glow-b on .thc-hero in style.css: change the two glow colors, for example to blue and teal for a cooler look.
  • --thc-grid-size and --thc-grid-color: make the background grid denser, larger or more visible; delete the .thc-grid element to remove it.
  • from-fuchsia-400 via-pink-400 to-orange-300 on the highlighted headline span: set a different gradient, or remove bg-clip-text text-transparent for solid text.
  • bg-zinc-950 on .thc-hero: switch to bg-slate-950 or bg-indigo-950 for a different dark base.
  • sm:text-6xl on the h1: use lg:text-7xl for a bolder statement on large screens.
  • Edit the li.thc-logo items: replace the inline SVGs and names with your customers' logos, ideally as monochrome SVGs using currentColor.
  • animation: thc-breathe 8s on .thc-glow: remove it for a static glow.

Use cases

  • SaaS landing pages: an announcement pill, gradient headline and two buttons fill the first screen
  • Product launches: the pill can highlight a new release above the headline
  • App websites: a row of customer logos below the buttons adds trust
  • Dark themed sites: a glowing grid background gives depth without any JavaScript

Accessibility

The section is labelled by its heading through aria-labelledby="thc-title", and the page has a single h1. The decorative grid, glow and all icons are aria-hidden; the logo list has aria-label="Customer logos" and every logo includes a readable name. Text colors on the near-black background (zinc-100, zinc-400) meet WCAG AA contrast. Links show a fuchsia focus-visible outline with an offset so it stays visible on the dark surface. The glow animation and all hover transitions are disabled under prefers-reduced-motion: reduce.

Usage notes

Point the href of the pill and both CTAs to real pages. If the hero is not the first heading on your page, change h1 to h2.

Centered Hero with Announcement Badge at a glance

Framework
Tailwind CSS
Code
HTML, CSS
JavaScript
Only Tailwind CSS's own script
Dependencies
Tailwind CSS
Layout
Responsive, works on mobile, dark design
Category
Hero Sections
License
Free for personal and commercial use

Questions about this template

Can I use the Centered Hero with Announcement Badge code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Tailwind CSS from a CDN (the links are under Requirements). Paste the HTML where the component should appear and add the CSS to your stylesheet. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. Only Tailwind CSS's own JavaScript is used, and the download already includes it.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

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

The Tailwind browser build is for prototyping. In production, compile Tailwind with its CLI or your bundler.

Centered Hero with Announcement Badge – free Tailwind CSS hero section template
Centered Hero with Announcement Badge · free Tailwind CSS hero section template

More Hero Sections

Split Hero with Diagonal Photo Clip – free Pure CSS hero section template

Split Hero with Diagonal Photo Clip

Pure CSS split hero with headline, buttons and stats beside a full-height photo cut on a diagonal with clip-path, plus an accent stripe and rating badge.

Hero with Rotating Words – free Pure CSS hero section template

Hero with Rotating Words

Dark hero section whose headline cycles through words with a slide-and-fade animation, a pause button and decorative stat cards.

Split Hero with App Screenshot – free Tailwind CSS hero section template

Split Hero with App Screenshot

Dark Tailwind CSS split hero with gradient headline, two CTA buttons and an animated mock app dashboard built entirely from divs.

Hero with Background Video Overlay – free Bootstrap 6 hero section template

Hero with Background Video Overlay

Full-width Bootstrap 6 hero with a muted background video or slow-zoom poster photo, dark gradient overlay, headline, two buttons, stats and a pause control.

Dark Gradient Hero – free Bootstrap 6 hero section template

Dark Gradient Hero

Dark Bootstrap 6 hero with a blurred gradient mesh, gradient headline, glowing CTA, copyable install command, decorative orb with stats and a row of trust logos.

Split Hero with Stats – free Bootstrap 6 hero section template

Split Hero with Stats

Bootstrap 6 split hero with a highlighted headline, CTAs and avatar social proof beside a bento grid of key stats with a 12-month / all-time toggle.