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.
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.
components/hero-media-overlay.tsxnpx hoverlab add hero-media-overlay
Or over MCP, from your editor's agent — no account needed.
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.
Start a page with this section — add more, order them, and leave with the page source.
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.
/**
* <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>
)
}
bg-card, text-muted-foreground) — it inherits your theme instead of overriding it.Drop it at components/hero-media-overlay.tsx and import it where you need the section:
import { HeroMediaOverlay } from '@/components/hero-media-overlay'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.
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.
| Prop | Type | Default |
|---|---|---|
eyebrow | string | 'Autumn collection' |
heading | string | 'Made to be worn out.' |
subheading | string | — |
primaryLabel | string | 'Shop the collection' |
primaryHref | string | '#' |
secondaryLabel | string | 'Watch the film' |
secondaryHref | string | '#' |
childrenThe media layer — an <img> or <video>. Falls back to a gradient. | React.ReactNode | — |
className | string | '' |
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.
<!--
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;&gt;*]:h-full [&amp;&gt;*]:w-full [&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>
What each framework gets across the whole catalog — effects convert properly; this rung is markup.
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.
Want the whole screen instead of this one section? Open a page and copy it entire.
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 HeroesCopying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.