Email signup with a live avatar stack: new people slide in, the last one tucks under a rolling join counter.
Set your access key from API keys as NEXTUI_TOKEN in .env.local and add the @nextui namespace below to components.json once. Then every item installs by name. Each install counts as a copy on a free account.
$pnpm dlx shadcn@latest add @nextui/waitlist
1{2"registries": {3"@nextui": {4"url": "https://nextui.dev/r/{name}.json",5"headers": { "Authorization": "Bearer ${NEXTUI_TOKEN}" }6}7}8}
1"use client";23import { Waitlist } from "@/components/nextui/waitlist";45export function LaunchWaitlist({ signups }: { signups: number }) {6return (7<Waitlist8buttonLabel="Get early access"9joinedLabel="See you soon"10countLabel="Makers on the list"11defaultCount={signups}12simulate={false}13avatars={[14{ initials: "AN", photo: "/team/an.jpg" },15{ initials: "BL", photo: "/team/bl.jpg" },16{ initials: "CT" },17]}18visibleAvatars={3}19onSubmit={(email) => fetch("/api/waitlist", { method: "POST", body: JSON.stringify({ email }) })}20/>21);22}
| Prop | Type | Default | Description |
|---|---|---|---|
| placeholder | string | "Enter your email" | Placeholder text of the email field |
| buttonLabel | ReactNode | "Join Waitlist" | Text of the submit button |
| joinedLabel | ReactNode | "You're in" | Button text after joining |
| countLabel | ReactNode | "People joined today" | Text beside the counter |
| count | number | – | Controlled count shown in the badge |
| defaultCount | number | 180 | Starting count when uncontrolled |
| avatars | WaitlistAvatar[] | 12 sample faces | Faces for the stack, cycled in order: initials and an optional photo |
| visibleAvatars | number | 5 | How many avatars stay in the stack |
| selfInitials | string | "You" | Initials of the avatar added when the visitor joins |
| simulate | boolean | true | Add a fake joiner on a timer while in view |
| interval | number | 2200 | Milliseconds between simulated joiners |
| id | string | "waitlist-email" | Id of the email field |
| onSubmit | (email: string) => void | – | Called with the email when the form is submitted |
| className | string | – | Extra classes on the wrapper |
Sign in to see the code
Preview it freely. A free account copies code and prompts a few times a day.