Hero: waitlist
Hero with an email signup form that works without JavaScript.
Preview
The field glows on focus. With onSubmit, the button turns into “Sending…” and then the form morphs into a success message. With reduced motion turned on, it renders the plain layout.
Be first in line
Leave your email and we will write once, when it launches. Sample copy.
One email at launch. No spam.
Coming soon
Be first in line
Leave your email and we will write once, when it launches. Sample copy.
One email at launch. No spam.
Installation
Run this in a project that already uses shadcn/ui. It adds the component and anything it needs; the motion version also adds the plain one and the motion package.
Usage
import { HeroWaitlist } from "@/components/custom/hero-waitlist";
<HeroWaitlist
title="Be first in line"
action="/api/waitlist"
note="One email when we launch. No spam."
/>import { HeroWaitlistMotion } from "@/components/custom/hero-waitlist/hero-waitlist-motion";
<HeroWaitlistMotion
title="Be first in line"
action="/api/waitlist"
onSubmit={async (email) => {
await fetch("/api/waitlist", { method: "POST", body: JSON.stringify({ email }) });
}}
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title* (required) | string | – | The headline, rendered as the page's h1. |
| eyebrow | string | – | Small badge above the title. |
| description | string | – | Supporting line under the title. |
| action* (required) | string | – | Where the form posts (your API route or a form service). |
| method | "post" | "get" | "post" | Form method. |
| inputLabel | string | "Email address" | Label for the email field (visually hidden). |
| buttonLabel | string | "Join the waitlist" | Submit button text. |
| note | string | – | Small print under the form. |
| honeypotName | string | – | Name of a hidden field only bots fill in. Your endpoint should drop submissions where it is not empty. |
| ...props | React.ComponentProps<"section"> | – | Any other section attribute (id, aria-*, data-*, ref) goes to the root element. |
| Prop | Type | Default | Description |
|---|---|---|---|
| title* (required) | string | – | The headline, rendered as the page's h1. |
| eyebrow | string | – | Small badge above the title. |
| description | string | – | Supporting line under the title. |
| action* (required) | string | – | Where the form posts (your API route or a form service). |
| method | "post" | "get" | "post" | Form method. |
| inputLabel | string | "Email address" | Label for the email field (visually hidden). |
| buttonLabel | string | "Join the waitlist" | Submit button text. |
| note | string | – | Small print under the form. |
| honeypotName | string | – | Name of a hidden field only bots fill in. Your endpoint should drop submissions where it is not empty. |
| ...props | React.ComponentProps<"section"> | – | Any other section attribute (id, aria-*, data-*, ref) goes to the root element. |
| onSubmit | (email: string) => Promise<void> | – | Handle the signup yourself; shows sending, success and error states. Without it the form posts to action. |
Accessibility
- The email field has a real label and uses type="email" with autocomplete, so browsers validate and fill it.
- The motion version follows the visitor's reduced-motion setting and never hides content before it animates.