Bento Feature Grid
Six tiles on an asymmetric 4x3 grid with per-tile spans, a hover glow and a mobile collapse that follows source order.
A feature section paired with a tabbed fake editor — real selectable code, generated line numbers and a copy button.
components/code-showcase.tsxnpx hoverlab add code-showcase
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.
No install step, no configuration file, no build plugin.
import { PricingTiers } from '@/components/pricing-tiers'import { FaqAccordion } from '@/components/faq-accordion' export default function Page() { return ( <main> <PricingTiers /> <FaqAccordion /> </main> )}Rendered live in your current theme — this is the same component whose source is below, not a screenshot of it.
'use client'
/**
* <CodeShowcase> — a feature section with a fake editor window beside it.
*
* Tabs switch the visible file. The window chrome is decorative and marked
* `aria-hidden`; the code itself sits in a real <pre> so it can be selected
* and copied, which is the entire point of showing code on a landing page.
*
* Line numbers are generated from the source rather than typed into it, so
* copying picks up the code without the gutter coming along.
*/
import * as React from 'react'
import { Copy, Check } from 'lucide-react'
export interface CodeFile {
name: string
code: string
}
export interface CodeShowcaseProps {
files?: CodeFile[]
heading?: string
subheading?: string
bullets?: string[]
className?: string
}
const DEFAULT_FILES: CodeFile[] = [
{
name: 'page.tsx',
code: `import { PricingTiers } from '@/components/pricing-tiers'
import { FaqAccordion } from '@/components/faq-accordion'
export default function Page() {
return (
<main>
<PricingTiers />
<FaqAccordion />
</main>
)
}`,
},
{
name: 'theme.css',
code: `:root {
--background: 0 0% 100%;
--foreground: 240 10% 4%;
--primary: 243 75% 59%;
--muted: 240 5% 96%;
--border: 240 6% 90%;
}
.dark {
--background: 240 10% 4%;
--foreground: 0 0% 98%;
--primary: 234 89% 74%;
}`,
},
]
export function CodeShowcase({
files = DEFAULT_FILES,
heading = 'Paste it. Ship it.',
subheading = 'No install step, no configuration file, no build plugin.',
bullets = [
'Copy the section straight into your project',
'Restyle it with your own tokens, not our overrides',
'Delete what you do not need — it is your code now',
],
className = '',
}: CodeShowcaseProps) {
const [active, setActive] = React.useState(0)
const [copied, setCopied] = React.useState(false)
const file = files[active] ?? files[0]
async function copy() {
await navigator.clipboard.writeText(file.code)
setCopied(true)
window.setTimeout(() => setCopied(false), 1600)
}
return (
<section className={`mx-auto w-full max-w-7xl px-4 py-16 sm:px-6 lg:px-8 ${className}`}>
<div className="grid grid-cols-1 items-center gap-10 lg:grid-cols-2 lg:gap-16">
<div>
<h2 className="text-balance text-3xl font-bold tracking-tight sm:text-4xl">
{heading}
</h2>
{subheading ? <p className="mt-3 text-muted-foreground">{subheading}</p> : null}
<ul className="mt-6 space-y-3">
{bullets.map((b) => (
<li key={b} className="flex items-start gap-2.5 text-sm">
<Check aria-hidden className="mt-0.5 h-4 w-4 shrink-0 text-emerald-500" />
<span className="text-muted-foreground">{b}</span>
</li>
))}
</ul>
</div>
<div className="overflow-y-hidden rounded-2xl border border-border/60 bg-zinc-950 shadow-xl">
{/* Window chrome */}
<div className="flex flex-wrap items-center gap-2 border-b border-white/10 px-4 py-3">
<div aria-hidden className="flex shrink-0 gap-1.5">
<span className="h-3 w-3 rounded-full bg-red-500/80 border border-transparent" />
<span className="h-3 w-3 rounded-full bg-amber-500/80 border border-transparent" />
<span className="h-3 w-3 rounded-full bg-emerald-500/80 border border-transparent" />
</div>
<div role="tablist" className="ms-3 flex flex-wrap gap-1">
{files.map((f, i) => (
<button
key={f.name}
role="tab"
type="button"
aria-selected={i === active}
onClick={() => setActive(i)}
className={`rounded-md px-2.5 py-1 font-mono text-xs transition-colors ${
i === active
? 'bg-white/10 text-white'
: 'text-white/50 hover:text-white/80'
}`}
>
{f.name}
</button>
))}
</div>
<button
type="button"
onClick={copy}
aria-label={`Copy ${file.name}`}
className="ms-auto inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-white/50 transition-colors hover:bg-white/10 hover:text-white"
>
{copied ? (
<Check aria-hidden className="h-3.5 w-3.5 text-emerald-400" />
) : (
<Copy aria-hidden className="h-3.5 w-3.5" />
)}
{copied ? 'Copied' : 'Copy'}
</button>
</div>
<pre className="overflow-x-auto p-4 text-xs leading-relaxed">
<code className="font-mono text-zinc-300">
{file.code.split('\n').map((line, i) => (
<span key={i} className="grid grid-cols-[2rem_1fr]">
<span aria-hidden className="select-none text-end text-white/50">
{i + 1}
</span>
<span className="ps-4">{line || ' '}</span>
</span>
))}
</code>
</pre>
</div>
</div>
</section>
)
}
bg-card, text-muted-foreground) — it inherits your theme instead of overriding it.Drop it at components/code-showcase.tsx and import it where you need the section:
import { CodeShowcase } from '@/components/code-showcase'2 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 |
|---|---|---|
files | CodeFile[] | DEFAULT_FILES |
heading | string | 'Paste it. Ship it.' |
subheading | string | 'No install step, no configuration file, no b… |
bullets | string[] | — |
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.
<!--
Editor Window Showcase — 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="mx-auto w-full max-w-7xl px-4 py-16 sm:px-6 lg:px-8 ">
<div class="grid grid-cols-1 items-center gap-10 lg:grid-cols-2 lg:gap-16">
<div>
<h2 class="text-balance text-3xl font-bold tracking-tight sm:text-4xl">Paste it. Ship it.</h2>
<p class="mt-3 text-muted-foreground">No install step, no configuration file, no build plugin.</p>
<ul class="mt-6 space-y-3">
<li class="flex items-start gap-2.5 text-sm">
<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-check mt-0.5 h-4 w-4 shrink-0 text-emerald-500" aria-hidden="true">
<path d="M20 6 9 17l-5-5"></path>
</svg>
<span class="text-muted-foreground">Copy the section straight into your project</span>
</li>
<li class="flex items-start gap-2.5 text-sm">
<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-check mt-0.5 h-4 w-4 shrink-0 text-emerald-500" aria-hidden="true">
<path d="M20 6 9 17l-5-5"></path>
</svg>
<span class="text-muted-foreground">Restyle it with your own tokens, not our overrides</span>
</li>
<li class="flex items-start gap-2.5 text-sm">
<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-check mt-0.5 h-4 w-4 shrink-0 text-emerald-500" aria-hidden="true">
<path d="M20 6 9 17l-5-5"></path>
</svg>
<span class="text-muted-foreground">Delete what you do not need — it is your code now</span>
</li>
</ul>
</div>
<div class="overflow-y-hidden rounded-2xl border border-border/60 bg-zinc-950 shadow-xl">
<div class="flex flex-wrap items-center gap-2 border-b border-white/10 px-4 py-3">
<div aria-hidden="true" class="flex shrink-0 gap-1.5">
<span class="h-3 w-3 rounded-full bg-red-500/80 border border-transparent"></span>
<span class="h-3 w-3 rounded-full bg-amber-500/80 border border-transparent"></span>
<span class="h-3 w-3 rounded-full bg-emerald-500/80 border border-transparent"></span>
</div>
<div role="tablist" class="ms-3 flex flex-wrap gap-1">
<button role="tab" type="button" aria-selected="true" class="rounded-md px-2.5 py-1 font-mono text-xs transition-colors bg-white/10 text-white">page.tsx</button>
<button role="tab" type="button" aria-selected="false" class="rounded-md px-2.5 py-1 font-mono text-xs transition-colors text-white/50 hover:text-white/80">theme.css</button>
</div>
<button type="button" aria-label="Copy page.tsx" class="ms-auto inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-white/50 transition-colors hover:bg-white/10 hover:text-white"><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-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg>Copy</button>
</div>
<pre class="overflow-x-auto p-4 text-xs leading-relaxed"><code class="font-mono text-zinc-300"><span class="grid grid-cols-[2rem_1fr]"><span aria-hidden="true" class="select-none text-end text-white/50">1</span><span class="ps-4">import { PricingTiers } from '@/components/pricing-tiers'</span></span><span class="grid grid-cols-[2rem_1fr]"><span aria-hidden="true" class="select-none text-end text-white/50">2</span><span class="ps-4">import { FaqAccordion } from '@/components/faq-accordion'</span></span><span class="grid grid-cols-[2rem_1fr]"><span aria-hidden="true" class="select-none text-end text-white/50">3</span><span class="ps-4"> </span></span><span class="grid grid-cols-[2rem_1fr]"><span aria-hidden="true" class="select-none text-end text-white/50">4</span><span class="ps-4">export default function Page() {</span></span><span class="grid grid-cols-[2rem_1fr]"><span aria-hidden="true" class="select-none text-end text-white/50">5</span><span class="ps-4"> return (</span></span><span class="grid grid-cols-[2rem_1fr]"><span aria-hidden="true" class="select-none text-end text-white/50">6</span><span class="ps-4"> <main></span></span><span class="grid grid-cols-[2rem_1fr]"><span aria-hidden="true" class="select-none text-end text-white/50">7</span><span class="ps-4"> <PricingTiers /></span></span><span class="grid grid-cols-[2rem_1fr]"><span aria-hidden="true" class="select-none text-end text-white/50">8</span><span class="ps-4"> <FaqAccordion /></span></span><span class="grid grid-cols-[2rem_1fr]"><span aria-hidden="true" class="select-none text-end text-white/50">9</span><span class="ps-4"> </main></span></span><span class="grid grid-cols-[2rem_1fr]"><span aria-hidden="true" class="select-none text-end text-white/50">10</span><span class="ps-4"> )</span></span><span class="grid grid-cols-[2rem_1fr]"><span aria-hidden="true" class="select-none text-end text-white/50">11</span><span class="ps-4">}</span></span></code></pre>
</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 Feature SectionsCopying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.
Six tiles on an asymmetric 4x3 grid with per-tile spans, a hover glow and a mobile collapse that follows source order.
A full row per feature with the media side flipping each time, so the eye re-enters the page instead of skimming a stack of identical blocks.
Uniform cells, no spans, no state — the grid for nine things that matter equally, where a bento would be a wall and tabs would be a filing cabinet.
What each integration actually does, not a wall of logos — with availability as a text pill rather than a tinted border, and the name as the link so the card is not one enormous one.
A "who this is for" grid: four cards naming an audience, the outcome they want and the bullets that get them there.
Features as a real tablist — arrow keys, roving focus and a drawn product panel per tab — for the section where four features would otherwise fight for one scroll.
An integrations section that says how deep each one goes, instead of a wall of logos that all imply the same thing.