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.
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.
components/hero-search.tsxnpx hoverlab add hero-search
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.
Six hundred production-ready sections, searchable by what they do rather than what they are called.
Rendered live in your current theme — this is the same component whose source is below, not a screenshot of it.
/**
* <HeroSearch> — a hero whose primary call to action is a search field.
*
* The hero for a marketplace, directory or docs site: products where the
* visitor already knows what they want and the worst thing you can do is
* make them hunt for the search box below the fold.
*
* The form is a real `<form role="search">` with a labelled input, not a
* decorative box. A search hero that only *looks* like search is the one
* case where the drawing costs something real — someone tabbing into it
* expects to type and press Enter.
*
* The suggestion chips underneath are buttons, not links: they fill the
* field rather than navigating, which is why the whole thing keeps local
* state and carries `'use client'`.
*/
'use client'
import * as React from 'react'
import { Search, TrendingUp } from 'lucide-react'
export interface HeroSearchProps {
heading?: string
subheading?: string
placeholder?: string
submitLabel?: string
/** Prefilled queries offered under the field. */
suggestions?: string[]
/** Called with the query on submit. Defaults to a no-op. */
onSearch?: (query: string) => void
/**
* Id for the field. A server component cannot call `useId`, so this is
* the escape hatch for a page that renders two of these: give the second
* one its own id rather than letting both labels resolve to the first.
*/
inputId?: string
className?: string
}
const DEFAULT_SUGGESTIONS = ['Dashboards', 'Auth flows', 'Pricing tables', 'Empty states']
export function HeroSearch({
heading = 'Find the component you were about to build.',
subheading = 'Six hundred production-ready sections, searchable by what they do rather than what they are called.',
placeholder = 'Search components, patterns, categories…',
submitLabel = 'Search',
suggestions = DEFAULT_SUGGESTIONS,
inputId = 'hero-search-input',
onSearch,
className = '',
}: HeroSearchProps) {
const [query, setQuery] = React.useState('')
function handleSubmit(event: React.FormEvent) {
event.preventDefault()
onSearch?.(query)
}
return (
<section className={`relative overflow-hidden ${className}`}>
<div aria-hidden className="pointer-events-none absolute inset-0 -z-10">
<div className="absolute -top-40 left-1/2 h-[28rem] w-[28rem] -translate-x-1/2 rounded-full bg-primary/15 blur-3xl border border-transparent" />
</div>
<div className="mx-auto w-full max-w-3xl px-4 py-20 text-center sm:px-6 lg:px-8 lg:py-28">
<h1 className="text-balance break-words text-4xl font-extrabold tracking-tight sm:text-5xl lg:text-6xl">
{heading}
</h1>
<p className="mx-auto mt-5 max-w-xl text-pretty text-base leading-relaxed text-muted-foreground sm:text-lg">
{subheading}
</p>
<form
role="search"
onSubmit={handleSubmit}
className="mx-auto mt-9 flex w-full max-w-xl flex-col gap-2 sm:flex-row"
>
<div className="relative flex-1">
<label htmlFor={inputId} className="sr-only">
Search
</label>
<Search
aria-hidden
className="pointer-events-none absolute start-4 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"
/>
<input
id={inputId}
type="search"
value={query}
onChange={(e) => setQuery(e.target.value)}
placeholder={placeholder}
className="w-full rounded-xl border border-border/60 bg-card/70 py-3.5 ps-11 pe-4 text-sm shadow-sm backdrop-blur transition-colors placeholder:text-muted-foreground focus-visible:border-primary/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
/>
</div>
<button
type="submit"
className="inline-flex items-center justify-center rounded-xl bg-primary px-6 py-3.5 text-sm font-semibold text-primary-foreground shadow-lg shadow-primary/25 transition-transform hover:-translate-y-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
>
{submitLabel}
</button>
</form>
{suggestions.length > 0 ? (
<div className="mt-6 flex flex-wrap items-center justify-center gap-2">
<span className="inline-flex items-center gap-1.5 text-xs text-muted-foreground">
<TrendingUp aria-hidden className="h-3.5 w-3.5" />
Popular
</span>
{suggestions.map((s) => (
<button
key={s}
type="button"
onClick={() => setQuery(s)}
className="rounded-full border border-border/60 bg-card/60 px-3 py-1 text-xs font-medium text-muted-foreground backdrop-blur transition-colors hover:border-primary/40 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
>
{s}
</button>
))}
</div>
) : null}
</div>
</section>
)
}
bg-card, text-muted-foreground) — it inherits your theme instead of overriding it.Drop it at components/hero-search.tsx and import it where you need the section:
import { HeroSearch } from '@/components/hero-search'4 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 |
|---|---|---|
heading | string | 'Find the component you were about to build.' |
subheading | string | — |
placeholder | string | 'Search components, patterns, categories…' |
submitLabel | string | 'Search' |
suggestionsPrefilled queries offered under the field. | string[] | DEFAULT_SUGGESTIONS |
onSearchCalled with the query on submit. Defaults to a no-op. | (query: string) => void | — |
inputIdId for the field. A server component cannot call `useId`, so this is the escape hatch for a page that renders two of these: give the second one its own id rather than letting both labels resolve to the first. | string | 'hero-search-input' |
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.
This block is interactive. The markup below is its initial state with the event handlers stripped — you will need to re-wire the behaviour in your framework.
<!--
Search-First 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 is interactive in React and the handlers are NOT here.
Buttons, toggles and menus render in their initial state and do
nothing until you wire them up.
-->
<section class="relative overflow-hidden ">
<div aria-hidden="true" class="pointer-events-none absolute inset-0 -z-10">
<div class="absolute -top-40 left-1/2 h-[28rem] w-[28rem] -translate-x-1/2 rounded-full bg-primary/15 blur-3xl border border-transparent"></div>
</div>
<div class="mx-auto w-full max-w-3xl px-4 py-20 text-center sm:px-6 lg:px-8 lg:py-28">
<h1 class="text-balance break-words text-4xl font-extrabold tracking-tight sm:text-5xl lg:text-6xl">Find the component you were about to build.</h1>
<p class="mx-auto mt-5 max-w-xl text-pretty text-base leading-relaxed text-muted-foreground sm:text-lg">Six hundred production-ready sections, searchable by what they do rather than what they are called.</p>
<form role="search" class="mx-auto mt-9 flex w-full max-w-xl flex-col gap-2 sm:flex-row">
<div class="relative flex-1">
<label for="hero-search-input" class="sr-only">Search</label>
<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-search pointer-events-none absolute start-4 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" aria-hidden="true">
<path d="m21 21-4.34-4.34"></path>
<circle cx="11" cy="11" r="8"></circle>
</svg>
<input id="hero-search-input" type="search" placeholder="Search components, patterns, categories…" class="w-full rounded-xl border border-border/60 bg-card/70 py-3.5 ps-11 pe-4 text-sm shadow-sm backdrop-blur transition-colors placeholder:text-muted-foreground focus-visible:border-primary/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background" value="" />
</div>
<button type="submit" class="inline-flex items-center justify-center rounded-xl bg-primary px-6 py-3.5 text-sm font-semibold text-primary-foreground shadow-lg shadow-primary/25 transition-transform hover:-translate-y-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background">Search</button>
</form>
<div class="mt-6 flex flex-wrap items-center justify-center gap-2">
<span class="inline-flex items-center gap-1.5 text-xs text-muted-foreground"><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-trending-up h-3.5 w-3.5" aria-hidden="true"><path d="M16 7h6v6"></path><path d="m22 7-8.5 8.5-5-5L2 17"></path></svg>Popular</span>
<button type="button" class="rounded-full border border-border/60 bg-card/60 px-3 py-1 text-xs font-medium text-muted-foreground backdrop-blur transition-colors hover:border-primary/40 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background">Dashboards</button>
<button type="button" class="rounded-full border border-border/60 bg-card/60 px-3 py-1 text-xs font-medium text-muted-foreground backdrop-blur transition-colors hover:border-primary/40 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background">Auth flows</button>
<button type="button" class="rounded-full border border-border/60 bg-card/60 px-3 py-1 text-xs font-medium text-muted-foreground backdrop-blur transition-colors hover:border-primary/40 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background">Pricing tables</button>
<button type="button" class="rounded-full border border-border/60 bg-card/60 px-3 py-1 text-xs font-medium text-muted-foreground backdrop-blur transition-colors hover:border-primary/40 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background">Empty states</button>
</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 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.
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.
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.