Waitlist: centered signup panel
A centered launch announcement and email signup inside a bordered panel.
pnpm dlx shadcn@latest add @haze/waitlist-signup-panel---
import { Sparkles } from "@lucide/astro";
import { cn } from "../../../lib/haze/utils";
import Button from "../ui/button.astro";
import Input from "../ui/input.astro";
interface Props {
id?: string;
eyebrow?: string;
title?: string;
description?: string;
headingLevel?: 1 | 2 | 3;
formAction?: string;
submitLabel?: string;
privacyNote?: string;
class?: string;
}
const {
id = "waitlist-signup-panel",
eyebrow = "Coming soon",
title = "Get a note when we're ready",
description = "We're building a quieter place to plan and share work. Join the list for an invitation when it opens.",
headingLevel = 2,
formAction = "",
submitLabel = "Join the waitlist",
privacyNote = "We'll only email you about this launch.",
class: className,
} = Astro.props;
const Heading = ({ 1: "h1", 2: "h2", 3: "h3" } as const)[headingLevel];
---
<section aria-labelledby={`${id}-title`} class={cn("bg-background px-6 py-20 sm:py-24", className)}>
<div class="mx-auto max-w-3xl rounded-2xl border border-border bg-card px-6 py-10 text-center sm:px-12 sm:py-14">
<span class="mx-auto flex size-10 items-center justify-center rounded-lg bg-foreground/5 text-foreground inset-ring inset-ring-frame"><Sparkles aria-hidden="true" class="size-5" /></span>
<p class="mt-6 text-[0.6875rem]/4 font-medium tracking-wider text-muted-foreground uppercase">{eyebrow}</p>
<Heading id={`${id}-title`} class="mt-3 text-3xl/9 font-semibold tracking-tight text-balance text-foreground sm:text-4xl/11">{title}</Heading>
<p class="mx-auto mt-4 max-w-lg text-base/7 text-pretty text-muted-foreground">{description}</p>
<form action={formAction || undefined} method="post" class="mx-auto mt-8 max-w-md text-left">
<label for={`${id}-email`} class="block text-sm/5 font-medium text-foreground">Email address</label>
<div class="mt-2 flex flex-col gap-2 sm:flex-row">
<Input id={`${id}-email`} name="email" type="email" autocomplete="email" placeholder="[email protected]" required />
<Button type="submit" disabled={!formAction}>{submitLabel}</Button>
</div>
<p class="mt-3 text-[0.8125rem]/5 text-muted-foreground">{formAction ? privacyNote : "Demo form: add a form endpoint to accept signups."}</p>
</form>
</div>
</section>When to use
- Collecting interest before a product becomes available
- An email address is enough for the initial signup
When not to use
- Collecting a detailed inquiry; use contact-split-form
- The signup is for a recurring newsletter; use newsletter-inline
Installation
Add the Haze registry to components.json once, then install Waitlist: centered signup panel with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.
pnpm dlx shadcn@latest add @haze/waitlist-signup-panelnpx shadcn@latest add @haze/waitlist-signup-panelyarn dlx shadcn@latest add @haze/waitlist-signup-panelbunx --bun shadcn@latest add @haze/waitlist-signup-panelFirst time? Registry and theme setup
1. Add to components.json:
{
"registries": {
"@haze": "http://localhost:4329/r/{name}.json"
}
}2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | "waitlist-signup-panel" | Unique prefix for the section and email field. |
| eyebrow | string | "Coming soon" | Small label above the heading. |
| title | string | demo heading | Waitlist heading. |
| description | string | demo copy | Explanation of the upcoming launch. |
| headingLevel | 1 | 2 | 3 | 2 | Level of the section heading. |
| formAction | string | "" | POST endpoint; without it the form is labelled as a demo and submission is disabled. |
| submitLabel | string | "Join the waitlist" | Signup button text. |
| privacyNote | string | demo privacy note | Explanation shown when an endpoint is configured. |
| class | string | – | Additional section classes. |
Keyboard interactions
- Tab
- Reach the email field and the configured signup button.
Accessibility
- The required email input has a visible label and uses native email validation.
- The demo state explains why the signup button is disabled until an endpoint is supplied.
Notes for AI
Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.
Install and use
Install the Haze UI block "Waitlist: centered signup panel" with `npx shadcn@latest add @haze/waitlist-signup-panel`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import WaitlistSignupPanel from "@/components/haze/blocks/waitlist-signup-panel.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/blocks/waitlist-signup-panel.md
Customize with real content
Adapt the Haze waitlist-signup-panel block for our product. Replace the demo values of these props with our real content: id, eyebrow, title, description, headingLevel, formAction, submitLabel, privacyNote, class. Keep the layout, the heading level rules and these accessibility details: The required email input has a visible label and uses native email validation. The demo state explains why the signup button is disabled until an endpoint is supplied. Do not add raw color classes; use the Haze tokens.
Choose the right block
Before using waitlist-signup-panel, check it fits: use it when collecting interest before a product becomes available; an email address is enough for the initial signup. Avoid it when collecting a detailed inquiry; use contact-split-form; the signup is for a recurring newsletter; use newsletter-inline. Alternatives: @haze/contact-split-form, @haze/newsletter-inline.
Dependencies
- npm: @lucide/astro
- @haze/button
- @haze/input
- @haze/utils
- @haze/theme (one-time setup)
Source · Original Haze UI work.