Skip to content

React Hero Section

HeroSection is a React hero section block that sets a display headline, a lede and calls to action over any backdrop, with a lit glass frame for a product shot and a logo strip. Use it as the first block of a landing page.

npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/hero-section.json

New: every block, light and dark

Interfaces that catch the light

A glass component library for React, built on Base UI, Tailwind v4 and Motion. Copy the source and make it yours.

Centered, over a scene

The background slot takes a SheenScene (or any image). The product shot sits in a glass frame with a pool of light under it. Wrap a phrase of the headline in <em> to light it with the accent.

New: every block, light and dark

Interfaces that catch the light

A glass component library for React, built on Base UI, Tailwind v4 and Motion. Copy the source and make it yours.

Trusted by teams at

  • Alder
  • Brightloom
  • Cobalt
  • Driftwood
  • Evergreen

Files to copy

7 folders · 11 files · 4 packages
From theme/src/
  • blocks/hero-section.tsx
  • components/button/
  • components/spinner/
  • hooks/{use-latest.ts, use-magnetic.ts, use-media-query.ts, use-preferences.ts}
  • motion/{gate.ts, tokens.ts}
  • lib/{cn.ts, form.ts, heading.ts, state-light.tsx}
  • styles/
shadcn CLI
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/hero-section.jsonRegistry item: hero-section. The styles need the Tailwind v4 glass UI setup.
The examples also use
  • components/backdrop/scene.tsx
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/backdrop.json
Packages
pnpm add @base-ui/react clsx motion tailwind-merge

Start-aligned, with the built-in aurora

align='start' puts the copy at the start edge and the media beside it. Leave background out for the aurora; the actions can be buttons (onClick) as well as links.

Ship the dashboard, not the plumbing

Charts, tables and forms that already agree on spacing, focus and motion.

Read the docs
Your product shot

Props

PropTypeDefaultDescription
eyebrowReactNodeNoneSmall pill above the headline (ReactNode), for a release note or a category.
title (required)ReactNodeNoneThe headline (ReactNode). Wrap a phrase in <em> to light it with the accent.
descriptionReactNodeNoneSets the lede that sits under the headline (ReactNode).
primaryActionHeroActionNoneThe main call to action (HeroAction).
secondaryActionHeroActionNoneThe quieter call to action next to it (HeroAction).
mediaReactNodeNoneA product shot, video or live demo shown in a glass frame (ReactNode). Below the copy when centered, beside it when align="start".
mediaClassNamestringNoneClasses for the media frame (string), e.g. an aspect ratio.
backgroundReactNodeNoneWhat sits behind the copy (ReactNode): pass a SheenScene, an image or your own art. Omit it for the built-in aurora of token colours; pass null for none. It is decorative and hidden from assistive technology.
logosHeroLogo[]NoneThe logo strip under the hero (HeroLogo[]). It is a labelled list.
align"center" | "start""center"Alignment of the copy: "center" stacks everything on the middle line, "start" aligns it to the start edge and puts media beside it.
headingLevelHeadingLevelOption2Level of the headline (1 to 6); "none" renders a paragraph with no heading role (for an example). A landing page's hero is usually its h1: pass headingLevel={1}.
labelsPartial<HeroSectionLabels>defaultHeroSectionLabelsEvery other string, for translation: labels={{ region: "…" }}; omitted keys keep the English of defaultHeroSectionLabels. All 2 keys of HeroSectionLabels are listed in the key table under the props table.
classNamestringNoneAdds extra classes to the section (string).
HeroSectionLabels keys and English defaults (2)
Pass any key in labels; the rest keep the defaults of defaultHeroSectionLabels.
KeyEnglish default
regionIntroduction
logosTitleTrusted by teams at

Keyboard

KeysAction
TabThe calls to action in order, then whatever your media contains.
EnterFollow a link action or press a button action.

Accessibility

  • A <section> named by its headline (labels.region when headingLevel is 'none'). A landing page's hero is usually its h1: pass headingLevel={1}.
  • The background (aurora or SheenScene) is aria-hidden; the logo strip is a list labelled by labels.logosTitle and every logo has a text name.
  • Text and buttons rise by transform only; the frame fades in on itself. Reduced motion removes the movement.
  • Keep the headline over a calm part of your scene and raise dim until the lede reads at 4.5:1 in both themes.

All exports on this page

  • HeroSection — A landing-page hero: a display headline, a lede, one or two calls to action, an optional product shot in a lit glass frame and a logo strip.
  • defaultHeroSectionLabels — The English HeroSectionLabels used when labels is omitted; a partial labels prop is merged over it.

When to use the hero section

  • Use HeroSection above the fold of a product launch or open-source landing page, over a gradient or photo backdrop, with a headline, one sentence of lede, a primary and a secondary action, and a product shot in a lit glass frame underneath.
  • Use the background slot for a SheenScene or your own image when the page has a strong photographic mood, or leave it out for the built-in aurora drawn from the theme's token colours.
  • Use align="start" to put the copy at the start edge and the media beside it on a wide block, which suits a product page with a real screenshot or a live demo.
  • Skip it for a compact page header inside an app; a plain heading and a Button group are enough there, and the glass frame would compete with the content.
  • Pair it with FeatureGrid and Testimonials below it, SiteFooter at the end, and AnnouncementBanner above it, which together make a complete marketing page.

Frequently asked questions

20 blocks pages in all: browse them on All blocks.

By Lokendra Singh Rathore (GitHub, opens in a new tab). Published , updated .