Newsletter Capture Band
Email capture with a four-state submission machine and an aria-live status line, so the outcome is announced and not just shown.
A demo request that offers the self-serve escape first, so the people who did not want a call do not book one.
components/demo-request-form.tsxnpx hoverlab add demo-request-form
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.
Thirty minutes, screen-shared, against something of yours rather than a seeded demo account. If you would rather not talk to anyone, the free tier is the same product.
Rendered live in your current theme — this is the same component whose source is below, not a screenshot of it.
'use client'
/**
* <DemoRequestForm> — A demo request that offers the self-serve escape first, so the people who did not want a call do not book one.
*
* A demo form's layout problem is that it is aimed at two people who look
* identical on the way in: the one who wants a call, and the one who is
* there because the page offered no other way to proceed. The obvious wrong
* answer is to capture both, which fills a calendar with meetings that both
* sides resent.
*
* So the intro names the escape route in its own sentence — the free tier is
* the same product — before the fields. That loses bookings, deliberately,
* and the ones it loses were going to be cancelled or no-showed.
*
* Two fields. The second, "what do you want to see", is the one that makes
* the call worth attending: it decides what is set up in advance, so the
* thirty minutes are spent on the reader's problem rather than on a seeded
* demo account.
*
* Accessibility: `htmlFor`/`id` label association with `aria-describedby`
* hints, and a `role="status"` live region rendered empty on first paint —
* without which the "we'll be in touch" confirmation is invisible to a
* screen reader, on a form whose only outcome is that sentence.
*
* The demo defaults to `idle`. With no `onSubmit` it resolves immediately;
* a real one should hand off to a scheduler rather than promising a reply,
* because "book the call" and "we'll email you" are different promises.
*/
import * as React from 'react'
export interface DemoRequestFormProps {
heading?: string
intro?: string
submitLabel?: string
/** Called with the collected values. Resolve to accept, throw to reject. */
onSubmit?: (values: Record<string, string>) => Promise<void> | void
className?: string
}
type Status = 'idle' | 'pending' | 'done' | 'error'
/*
A typed array rather than `as const`. With `as const` the entries have
different shapes - some carry a hint, some do not - so `field.hint` is a
type error on the members that lack it, and the `'hint' in field` dance
needed to work around that is worse than declaring the field optional once.
*/
interface DemoRequestFormField {
name: string
label: string
type: string
hint?: string
}
const FIELDS: DemoRequestFormField[] = [
{ name: "email", label: "Work email", type: "email", hint: "The invitation goes here." },
{ name: "goal", label: "What do you want to see?", type: "text", hint: "One line. It decides what gets set up before you arrive." },
]
export function DemoRequestForm({
heading = "See it on your own data",
intro = "Thirty minutes, screen-shared, against something of yours rather than a seeded demo account. If you would rather not talk to anyone, the free tier is the same product.",
submitLabel = "Book the call",
onSubmit,
className,
}: DemoRequestFormProps) {
// Per-instance ids. A literal id in a reusable component is a
// collision waiting for the second copy on the page — and a <label>
// then resolves to whichever input rendered first.
const uid = React.useId()
const [status, setStatus] = React.useState<Status>('idle')
const [message, setMessage] = React.useState('')
async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
event.preventDefault()
const data = new FormData(event.currentTarget)
const values = Object.fromEntries(
FIELDS.map((field) => [field.name, String(data.get(field.name) ?? '')]),
)
setStatus('pending')
try {
await onSubmit?.(values)
setStatus('done')
setMessage('Thanks — that came through.')
} catch (error) {
setStatus('error')
setMessage(error instanceof Error ? error.message : 'That did not go through.')
}
}
return (
<section
aria-labelledby={`${uid}-demo-request-form-heading`}
className={`w-full bg-background px-6 py-16 ${className ?? ''}`}
>
<div className="mx-auto max-w-md rounded-xl border border-border bg-card p-8 shadow-sm">
<h2
id={`${uid}-demo-request-form-heading`}
className="text-xl font-semibold tracking-tight text-card-foreground"
>
{heading}
</h2>
<p className="mt-2 text-sm text-muted-foreground">{intro}</p>
<form onSubmit={handleSubmit} className="mt-6 space-y-4">
{FIELDS.map((field) => (
<div key={field.name}>
{/*
htmlFor / id rather than a wrapping label, so the hint can
sit outside the label and still be announced — that is what
aria-describedby is for.
*/}
<label
htmlFor={`${uid}-demo-request-form-${field.name}`}
className="block text-sm font-medium text-foreground"
>
{field.label}
</label>
<input
id={`${uid}-demo-request-form-${field.name}`}
name={field.name}
type={field.type}
required
aria-describedby={field.hint ? `${uid}-demo-request-form-${field.name}-hint` : undefined}
className="mt-1.5 w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
/>
{field.hint ? (
<p
id={`${uid}-demo-request-form-${field.name}-hint`}
className="mt-1 text-xs text-muted-foreground"
>
{field.hint}
</p>
) : null}
</div>
))}
<button
type="submit"
disabled={status === 'pending'}
className="w-full rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-60"
>
{status === 'pending' ? 'Working…' : submitLabel}
</button>
{/*
The live region is always in the DOM and starts empty. A region
mounted at the moment it gets text is frequently not announced —
the assistive tech never saw it become live.
*/}
<p
role="status"
aria-live="polite"
className={`min-h-5 text-sm ${
status === 'error' ? 'text-destructive' : 'text-muted-foreground'
}`}
>
{message}
</p>
</form>
</div>
</section>
)
}
bg-card, text-muted-foreground) — it inherits your theme instead of overriding it.Drop it at components/demo-request-form.tsx and import it where you need the section:
import { DemoRequestForm } from '@/components/demo-request-form'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 |
|---|---|---|
heading | string | "See it on your own data" |
intro | string | — |
submitLabel | string | "Book the call" |
onSubmitCalled with the collected values. Resolve to accept, throw to reject. | (values: Record<string, string>) => Promise<void> | void | — |
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.
<!--
Demo Request Form — 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 aria-labelledby="_R_0_-demo-request-form-heading" class="w-full bg-background px-6 py-16 ">
<div class="mx-auto max-w-md rounded-xl border border-border bg-card p-8 shadow-sm">
<h2 id="_R_0_-demo-request-form-heading" class="text-xl font-semibold tracking-tight text-card-foreground">See it on your own data</h2>
<p class="mt-2 text-sm text-muted-foreground">Thirty minutes, screen-shared, against something of yours rather than a seeded demo account. If you would rather not talk to anyone, the free tier is the same product.</p>
<form class="mt-6 space-y-4">
<div>
<label for="_R_0_-demo-request-form-email" class="block text-sm font-medium text-foreground">Work email</label>
<input id="_R_0_-demo-request-form-email" type="email" required="" aria-describedby="_R_0_-demo-request-form-email-hint" class="mt-1.5 w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" name="email" />
<p id="_R_0_-demo-request-form-email-hint" class="mt-1 text-xs text-muted-foreground">The invitation goes here.</p>
</div>
<div>
<label for="_R_0_-demo-request-form-goal" class="block text-sm font-medium text-foreground">What do you want to see?</label>
<input id="_R_0_-demo-request-form-goal" type="text" required="" aria-describedby="_R_0_-demo-request-form-goal-hint" class="mt-1.5 w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" name="goal" />
<p id="_R_0_-demo-request-form-goal-hint" class="mt-1 text-xs text-muted-foreground">One line. It decides what gets set up before you arrive.</p>
</div>
<button type="submit" class="w-full rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-60">Book the call</button>
<p role="status" aria-live="polite" class="min-h-5 text-sm text-muted-foreground"></p>
</form>
</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 CTA SectionsCopying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.
Email capture with a four-state submission machine and an aria-live status line, so the outcome is announced and not just shown.
A closing CTA of three link cards pointing at GitHub, chat and social — somewhere to go for the visitor who is not ready to convert.
A rounded gradient panel that restates the offer for the reader who scrolled past everything — heading left, both CTAs right, reassurance points underneath.
The call to action that follows a long page down — held back until the reader is past a scroll threshold, dismissible, and spaced so it never covers the content it is selling.
The offer that sits inside the column instead of interrupting it — a labelled aside a screen reader can skip in one keystroke, tied to the paragraph above it, with the friction admitted before the click.
A waitlist capture that shows position and referral credit, turning a dead-end confirmation into the one action that moves the queue.