Skip to content
Marketing block

Editor Window Showcase

A feature section paired with a tabbed fake editor — real selectable code, generated line numbers and a copy button.

164 lineslucide-reactAdded 8 Aug 2026Updated 2 Sept 2026
  • code
  • editor
  • terminal
  • developer
  • tabs

What's included

  • components/code-showcase.tsx
  • Needs lucide-react

Works with

  • React
  • Next.js
  • Tailwind CSS
  • TypeScript

npx hoverlab add code-showcase

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

Paste it. Ship it.

No install step, no configuration file, no build plugin.

  • 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
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.

Source

components/code-showcase.tsx
'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>
  )
}

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/code-showcase.tsx and import it where you need the section:

import { CodeShowcase } from '@/components/code-showcase'

Customize

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.

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
filesCodeFile[]DEFAULT_FILES
headingstring'Paste it. Ship it.'
subheadingstring'No install step, no configuration file, no b…
bulletsstring[]—
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.

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.

code-showcase.html
<!--
  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 &#x27;@/components/pricing-tiers&#x27;</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 &#x27;@/components/faq-accordion&#x27;</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">    &lt;main&gt;</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">      &lt;PricingTiers /&gt;</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">      &lt;FaqAccordion /&gt;</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">    &lt;/main&gt;</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>
  • 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.
  • This block is interactive in React — toggles, menus or form state. None of that survives here; the markup is the closed/default state and the handlers are gone. Re-wire them in your own framework.
  • 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.

7 more blocks in Feature Sections

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 Sections

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 Feature Sections blocks

View category
Open the full page for this block

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.

Feature Sections114 lines1 dep
Open the full page for this block

Alternating Feature Rows

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.

Feature Sections161 lines1 dep
Open the full page for this block

Icon Feature Grid

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.

Feature Sections150 lines1 dep
Open the full page for this block

Integration Directory Grid

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.

Feature Sections208 linesNo deps
Open the full page for this block

Audience Persona Cards

A "who this is for" grid: four cards naming an audience, the outcome they want and the bullets that get them there.

Feature Sections145 lines1 dep
Open the full page for this block

Tabbed Feature Showcase

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.

Feature Sections217 lines1 dep
Open the full page for this block

Integration Depth Split

An integrations section that says how deep each one goes, instead of a wall of logos that all imply the same thing.

Feature Sections157 linesNo deps