Skip to content

Centered gradient hero in React

A centered headline over a soft gradient background, with two actions and a reassurance line.

Here is an excerpt of this component's code in React. The full code is free for members, ready to copy into your project.

This component also comes in

Open in a new tab

The code in React

GradientCenteredHero.tsx
export function GradientCenteredHero() {
  return (
    <section className="grid justify-items-center gap-5 bg-[radial-gradient(40rem_22rem_at_20%_0%,#c7d7ff,transparent_70%),radial-gradient(36rem_20rem_at_85%_10%,#e9d5ff,transparent_70%)] px-5 py-20 text-center dark:bg-[radial-gradient(40rem_22rem_at_20%_0%,#1d3170,transparent_70%),radial-gradient(36rem_20rem_at_85%_10%,#3b1d63,transparent_70%)]">
      <p className="inline-flex items-center gap-2.5 rounded-full bg-white py-1 pr-3.5 pl-1 text-sm font-medium dark:bg-[#111a38]">
        <span className="rounded-full bg-[#2347d6] px-2.5 py-1 font-bold text-white dark:bg-[#8fa8ff] dark:text-[#060b1d]">
          Nouveau
        </span>{" "}
        Rapprochement bancaire automatique
      </p>
      <h1 className="max-w-[18ch] text-4xl leading-[1.04] font-extrabold tracking-[-0.035em] md:text-7xl">
        La comptabilité de votre entreprise, tenue au jour le jour
      </h1>

Free component: copy it freely, including for commercial projects.

Hero sections components in React
  • A dark hero where very large words, outlined or at low opacity, pass behind a two-column text. The animation is CSS only, with no script and no image.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A festival or fair header: dates, venue, featured artists, a real countdown to opening and ticket options.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Headline, service area, Google rating and job-site photo, with a direct call button and a short callback form (name, phone, need).

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A bright, warm hero: highlighted promise, two buttons, an avatar stack with a rating out of 5, and on the right a customer quote surrounded by result chips.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Headline, promise and two actions on the left, vector illustration on the right.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A large serif composition, sober and composed, for liberal professions.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component