React hero section components

8 hero section componentsLive previewFull source in your repo

Animated hero sections for the top of a website or landing page, from a CSS spotlight beam to a WebGL sky. One command installs the source into your React project, and every line stays yours to edit.

Works with

  • React
  • Next.js
  • TypeScript
  • Tailwind CSS

Hero section examples you can copy

Every hero section design here is one file: markup, motion and responsive Tailwind CSS. Preview it live, then copy the full source into your project.

Animated hero section backgrounds

Full bleed animated backgrounds that sit under your own headline and buttons. Use one when a ready made hero is close and you would rather write the layout yourself.

Hero headline text animations

The headline is the part of a hero people actually read. Each of these animates type without touching layout, so nothing shifts while it settles.

How to design a hero section for a landing page

A hero section is the first section of a website or landing page: the headline, one line of supporting text, a visual, and the buttons people see before they scroll. Its job is to say what the product does and who it is for. A good hero section answers that in a few seconds, and if a visitor cannot repeat your main point back after one read, no amount of animation will fix it.

Most hero section examples that work share the same four parts. A headline that names the outcome in plain words. A sub line of one sentence that says how. One primary button and, at most, a quieter second link. A visual that shows the product or sets the mood without competing with the text. Hero Section With Spotlight Beam keeps exactly those four on a dark full bleed surface, with an oversized headline anchored bottom left under a diagonal beam.

Speed is the trade off most teams run into. The hero is usually the largest thing on screen, which makes it the element Google times for Largest Contentful Paint. The heroes here split into two groups by how they draw the background. Spotlight Beam and 3D Monolith are pure CSS, with no model file and no renderer, so they paint as soon as the stylesheet loads. Animated Clouds and Black Hole draw their sky in a WebGL shader, which looks richer and has to compile before the first frame shows.

Choose the CSS group for a product page that has to feel instant on a mid range phone, and the WebGL group when the background is part of the pitch. A design tool, a studio portfolio or a launch page can carry a moving sky because the hero is demonstrating the thing being sold. A billing dashboard usually cannot, and the mismatch reads as decoration rather than proof.

A trust row under the buttons helps only when the logos are real. Hero Section With Radial Glow scrolls a strip of logos from right to left, and Hero Section With Eclipse Glow sets a static trusted by row under its two buttons. Swap both for companies that actually use your product, or delete the row. A borrowed logo in the first screen is the fastest way to lose a careful buyer.

Animate the headline when the motion carries meaning. Hero Section With Rotating Words cycles one word inside the headline, which suits a product with several audiences, such as a writing tool for essays, emails and posts. If the rotating word is only decoration, a static headline reads faster. The text animations listed above animate type without moving the layout, so nothing below the headline jumps while a word settles.

Design the mobile hero first. At around 360 pixels wide the headline, the sub line and the main button all have to fit above the fold, so a long headline needs a shorter version or a smaller type step. Every hero here collapses to one column below the medium breakpoint. Hero Section With Morphing Photo Arc is the exception worth testing by hand, because its ring of twenty photographs scrolls inside its own container.

Write the headline before you pick the design. Say what the product does instead of a slogan, keep the sub line to one sentence, and give the page one clear next step. A plain hero section with a sharp headline beats an animated one wrapped around a vague promise.

Frequently asked questions

A hero section is the large block at the top of a page that visitors see before scrolling. It usually holds a headline, a short supporting line, a visual and one or two buttons. Its purpose is to tell a new visitor what the site offers and what to do next, so it carries more weight than any other section on a landing page.

A headline that states the outcome, one sentence that explains how, a primary call to action, and a visual that supports the message. A secondary link and a short row of customer logos are optional. Leave out anything that competes with the main button, such as a second headline, a carousel of messages or more than two actions.

Run the Wensity CLI with the block slug, for example npx wensity@latest add hero-section-with-spotlight-beam --type block. The CLI copies the section into your codebase, installs the packages it needs, and matches it to your Tailwind theme. You can also open any hero on this page and copy the source straight from the Code tab. There is no provider to configure and no build step to add.

Anything that runs React. They are tested against Next.js 14 and newer in both the App Router and Pages Router, Vite 5 and newer, Remix and Astro. The only framework specific pieces are next/image and next/link, and each swaps out for a plain img tag and an anchor with no other changes.

It depends which one you pick, and the difference is significant. The CSS and Framer Motion heroes animate transform and opacity only, which stay off the main thread and cause no layout shift. The WebGL heroes load a renderer and compile shaders before their first frame, so they are heavier by nature. If a shader hero is your largest contentful paint element, put a static poster behind it or move it below the fold.

Yes. Wensity is not a runtime dependency. The CLI copies a real TypeScript file into your repository, so you own it outright. Edit the props, the copy, the Tailwind classes and the motion directly. Nothing overwrites your changes later and there is no package to keep upgrading.

Where to go next