Skip to content
Marketing block

Full-Bleed Media Hero

Copy over your own image or video, with a graded scrim and deliberately fixed light-on-dark text — because the background is a photograph in both themes, so flipping the copy would break it.

106 lineslucide-reactAdded 13 Aug 2026Updated 10 Sept 2026
  • hero
  • image
  • video
  • overlay
  • ecommerce

What's included

  • components/hero-media-overlay.tsx
  • Needs lucide-react

Works with

  • React
  • Next.js
  • Tailwind CSS
  • TypeScript

npx hoverlab add hero-media-overlay

Or over MCP, from your editor's agent — no account needed.

License

Free to read, copy and install, for personal and non-commercial projects. Shipping it in client work or a paid product needs Pro ($79 once). The source lands in your repo and stops being ours — no attribution, nothing to upgrade.

Was this useful?

Start a page with this section — add more, order them, and leave with the page source.

Preview

Autumn collection

Made to be worn out.

Twelve pieces, cut from deadstock wool in a mill that has been running since 1908. Built to outlast the season that named them.

Rendered live in your current theme — this is the same component whose source is below, not a screenshot of it.

Source

components/hero-media-overlay.tsx
/**
 * <HeroMediaOverlay> — full-bleed media behind copy, with the contrast fixed.
 *
 * The pattern every marketing site reaches for and most get wrong. Two
 * things make the difference between this and unreadable white-on-photo:
 *
 *  - A scrim. Not a flat 40% black wash over everything, but a gradient
 *    that is dense where the text sits and clears where the image is worth
 *    seeing. Text over an unknown photograph has *no* guaranteed contrast
 *    ratio, so the scrim is not decoration — it is the only reason this
 *    passes at all.
 *  - Fixed light-on-dark colours inside the media area. This one section
 *    deliberately does not follow the theme: the background is a
 *    photograph either way, so flipping the copy to dark in light mode
 *    would put dark text on a dark image.
 *
 * `children` is the media slot. Pass an `<img>`, a `<video muted loop
 * playsInline>` or nothing at all — the fallback is a themed gradient, so
 * the block still renders as a hero before anyone wires up an asset.
 *
 * A background video should be muted and `playsInline`, and should carry
 * `motion-reduce:hidden` so it is not forced on someone who asked for
 * stillness — the poster frame is a complete experience.
 */

import * as React from 'react'
import { ArrowRight, Play } from 'lucide-react'

export interface HeroMediaOverlayProps {
  eyebrow?: string
  heading?: string
  subheading?: string
  primaryLabel?: string
  primaryHref?: string
  secondaryLabel?: string
  secondaryHref?: string
  /** The media layer — an <img> or <video>. Falls back to a gradient. */
  children?: React.ReactNode
  className?: string
}

export function HeroMediaOverlay({
  eyebrow = 'Autumn collection',
  heading = 'Made to be worn out.',
  subheading =
    'Twelve pieces, cut from deadstock wool in a mill that has been running since 1908. Built to outlast the season that named them.',
  primaryLabel = 'Shop the collection',
  primaryHref = '#',
  secondaryLabel = 'Watch the film',
  secondaryHref = '#',
  children,
  className = '',
}: HeroMediaOverlayProps) {
  return (
    <section className={`relative isolate overflow-hidden ${className}`}>
      {/* -- Media ------------------------------------------------------- */}
      <div aria-hidden className="absolute inset-0 -z-20 [&>*]:h-full [&>*]:w-full [&>*]:object-cover">
        {children ?? (
          <div className="bg-gradient-to-br from-slate-900 via-slate-800 to-primary/40" />
        )}
      </div>

      {/* -- Scrim. Dense at the bottom-left where the copy sits. --------- */}
      <div
        aria-hidden
        className="absolute inset-0 -z-10 bg-gradient-to-t from-black/85 via-black/50 to-black/20"
      />

      <div className="mx-auto flex w-full max-w-7xl flex-col justify-end px-4 py-24 sm:px-6 lg:px-8 lg:py-36">
        <div className="max-w-2xl">
          {eyebrow ? (
            <span className="inline-flex items-center rounded-full border border-white/25 bg-white/10 px-3 py-1 text-xs font-medium text-white backdrop-blur">
              {eyebrow}
            </span>
          ) : null}

          <h1 className="mt-5 text-balance break-words text-4xl font-extrabold tracking-tight text-white drop-shadow-sm sm:text-5xl lg:text-7xl">
            {heading}
          </h1>

          <p className="mt-5 max-w-xl text-pretty text-base leading-relaxed text-white/85 sm:text-lg">
            {subheading}
          </p>

          <div className="mt-9 flex flex-col gap-3 sm:flex-row">
            <a
              href={primaryHref}
              className="inline-flex h-12 items-center justify-center gap-1.5 rounded-xl bg-white px-6 text-sm font-semibold text-slate-900 shadow-lg shadow-black/25 transition-transform hover:-translate-y-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-offset-2 focus-visible:ring-offset-transparent"
            >
              {primaryLabel}
              <ArrowRight aria-hidden className="h-4 w-4 rtl:rotate-180" />
            </a>
            <a
              href={secondaryHref}
              className="inline-flex h-12 items-center justify-center gap-2 rounded-xl border border-white/30 bg-white/10 px-6 text-sm font-semibold text-white backdrop-blur transition-colors hover:bg-white/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-offset-2 focus-visible:ring-offset-transparent"
            >
              <Play aria-hidden className="h-4 w-4" />
              {secondaryLabel}
            </a>
          </div>
        </div>
      </div>
    </section>
  )
}

Before you paste

  • Styling is Tailwind utility classes on semantic tokens (bg-card, text-muted-foreground) — it inherits your theme instead of overriding it.
  • Install: npm i lucide-react
  • Every prop has a default, so it renders standalone before you wire it up.

Where it goes

Drop it at components/hero-media-overlay.tsx and import it where you need the section:

import { HeroMediaOverlay } from '@/components/hero-media-overlay'

Customize

6 of this block’s props are simple enough to drive from here. Change them and the block below re-renders — it is the same component whose source is above, not a mock of it. Everything else it accepts is in the table underneath.

Props

Read out of the component’s own type and signature, so this cannot drift from the source below. Every prop has a default — the component renders standalone before you pass it anything.

PropTypeDefault
eyebrowstring'Autumn collection'
headingstring'Made to be worn out.'
subheadingstring—
primaryLabelstring'Shop the collection'
primaryHrefstring'#'
secondaryLabelstring'Watch the film'
secondaryHrefstring'#'
childrenThe media layer — an <img> or <video>. Falls back to a gradient.React.ReactNode—
classNamestring''

Not using React?

The same block rendered once to markup, wrapped as a file your framework compiles. Tailwind classes are framework-agnostic, so the design transfers intact — the behaviour does not.

hero-media-overlay.html
<!--
  Full-Bleed Media Hero — markup from the Hoverlab catalog.

  This is the block rendered once to HTML and wrapped as a component
  file. It is not a port of the React source: the Tailwind classes carry
  the design, which is the part that took the work, and they are the same
  in every framework.

  This block has no interactive behaviour, so nothing is missing.
-->
<section class="relative isolate overflow-hidden ">
  <div aria-hidden="true" class="absolute inset-0 -z-20 [&amp;amp;&amp;gt;*]:h-full [&amp;amp;&amp;gt;*]:w-full [&amp;amp;&amp;gt;*]:object-cover">
    <div class="bg-gradient-to-br from-slate-900 via-slate-800 to-primary/40"></div>
  </div>
  <div aria-hidden="true" class="absolute inset-0 -z-10 bg-gradient-to-t from-black/85 via-black/50 to-black/20"></div>
  <div class="mx-auto flex w-full max-w-7xl flex-col justify-end px-4 py-24 sm:px-6 lg:px-8 lg:py-36">
    <div class="max-w-2xl">
      <span class="inline-flex items-center rounded-full border border-white/25 bg-white/10 px-3 py-1 text-xs font-medium text-white backdrop-blur">Autumn collection</span>
      <h1 class="mt-5 text-balance break-words text-4xl font-extrabold tracking-tight text-white drop-shadow-sm sm:text-5xl lg:text-7xl">Made to be worn out.</h1>
      <p class="mt-5 max-w-xl text-pretty text-base leading-relaxed text-white/85 sm:text-lg">Twelve pieces, cut from deadstock wool in a mill that has been running since 1908. Built to outlast the season that named them.</p>
      <div class="mt-9 flex flex-col gap-3 sm:flex-row">
        <a href="#" class="inline-flex h-12 items-center justify-center gap-1.5 rounded-xl bg-white px-6 text-sm font-semibold text-slate-900 shadow-lg shadow-black/25 transition-transform hover:-translate-y-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-offset-2 focus-visible:ring-offset-transparent">Shop the collection<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right h-4 w-4 rtl:rotate-180" aria-hidden="true"><path d="M5 12h14"></path><path d="m12 5 7 7-7 7"></path></svg></a>
        <a href="#" class="inline-flex h-12 items-center justify-center gap-2 rounded-xl border border-white/30 bg-white/10 px-6 text-sm font-semibold text-white backdrop-blur transition-colors hover:bg-white/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-offset-2 focus-visible:ring-offset-transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-play h-4 w-4" aria-hidden="true"><polygon points="6 3 20 12 6 21 6 3"></polygon></svg>Watch the film</a>
      </div>
    </div>
  </div>
</section>
  • This is rendered HTML, not a translation of the React source. The Tailwind classes carry the design and work in any framework.
  • It is one frame: the component in its initial state, with no props applied beyond the defaults.
  • Requires Tailwind, and the design tokens the classes reference (bg-card, text-muted-foreground, and so on). The template ZIPs ship a globals.css that defines them.

What each framework gets across the whole catalog — effects convert properly; this rung is markup.

For AI

The component, its props, the design tokens it expects and the command that installs it — as one prompt. Paste it into Claude, Cursor, v0 or ChatGPT and what they build around it will match the rest of the catalog instead of inventing its own system.

See the prompt

Used in these pages

Want the whole screen instead of this one section? Open a page and copy it entire.

13 more blocks in Heroes

All of them free to read, copy and install — no account, no locked tiles, no watermarked preview. The whole catalog is open, and so are the API and the CLI.

Browse Heroes

Shipping one commercially

Copying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.

  • A commercial licence for everything in the catalog
  • Unlimited bundle exports, in Vue, Svelte and Tailwind
  • One payment — no subscription, nothing to renew
Pro — $79 once

More Heroes blocks

View category
Open the full page for this block

Split Hero with Product Panel

Copy on the left, a drawn product panel on the right — the default hero for anything with an interface to show, with no image asset to host and no layout shift while it loads.

Heroes176 lines1 dep
Open the full page for this block

Centered Announcement Hero

A linked announcement pill over a large centered headline, dual CTAs and a wordmark strip — the hero for a product with nothing to screenshot yet.

Heroes125 lines1 dep
Open the full page for this block

Hero with Browser Frame

Centered copy above a screenshot in window chrome, masked at the bottom so a tall image never dictates the height of the fold. Wraps your own img or video.

Heroes191 lines1 dep
Open the full page for this block

Waitlist Hero with Email Capture

A pre-launch hero whose only ask is an email address, with pending and success states and a signup count that argues for finishing rather than starting.

Heroes163 lines1 dep
Open the full page for this block

Search-First Hero

A hero whose primary action is a real search form with prefilling suggestion chips — for marketplaces and directories, where sending the visitor below the fold to find the search box is the whole failure.

Heroes128 lines1 dep
Open the full page for this block

Developer Hero with Install Command

A drawn terminal whose install line is real, selectable text with a working copy button and a feature-detected clipboard call — the hero for anything adopted by typing rather than signing up.

Heroes163 lines1 dep
Open the full page for this block

App Download Hero with Phone

A drawn phone beside two store links built as real anchors rather than badge images, so they inherit the theme, need no hosted asset and carry an accessible name that is not a filename.

Heroes161 lines1 dep
Open the full page for this block

Hero Anchored by a Customer Quote

Pitch on the left, a marked-up figure and blockquote on the right, so the claim and the evidence for it share the fold instead of sitting a scroll apart.

Heroes129 lines1 dep
Open the full page for this block

Hero with Proof Metrics

A centered hero closing on a definition list of scale numbers, with a masked grid wash behind it — for infrastructure and payments, where "how many" is the second question a buyer asks.

Heroes129 lines1 dep
Open the full page for this block

Editorial Masthead Hero

A serif display headline over a 60-character standfirst and a real byline, with one text link and no competing CTAs — the hero for publications and essays, where the writing is the product.

Heroes99 lines1 dep
Open the full page for this block

Integration Wall Hero

A hero whose visual is the connector list itself, marked up as a real list so a visitor can skim it for their own stack — asset-free initials tiles, no third-party marks to license.

Heroes135 lines1 dep
Open the full page for this block

Appointment Booking Hero

A day strip built as a radio group rather than buttons, so arrow keys move between dates and sold-out days disable properly — the fold for anything sold by the appointment.

Heroes168 lines1 dep
Open the full page for this block

Hero with Inline Price

Names the price above the fold for single-plan and one-time products, with the former price in a real strikethrough element so it is never announced as the current one.

Heroes135 lines1 dep