Waitlist section whose email field flies into the person's numbered ticket while their ball lands in the proof row and the count rolls up by one.
Press mePress me
Launch · March 12
Early access to the scheduling API.
Test keys, preview docs and a direct line to the team, weeks before the API opens to everyone.
Your seat#2,318
You're on the list
We'll write to m•••@company.com
Invite a colleague: you both move up 10 seats.
Not you?
GLARSBFCENMR+2,312
2,31720123456789,3012345678910123456789701234567892,318 on the list
waitlist-ticket · , lively
waitlist-ticket-demo.tsx
When to use
Use it for a waitlist with one email, a count of people waiting and a confirmation to keep. You supply onSubmit and resolve it with the position; the component sends nothing.
When not to use
For a newsletter box with no confirmation use a plain form, and for a sign-up with a password use an auth form. It is not a general form.
The waitlist or early-access section of a product that has not opened yet: one email, a count of the
people already waiting, and a confirmation the person keeps. Holding the submit sinks the field and
opens an empty seat at the end of the proof row (charge). When your onSubmit resolves, a copy of
the field flies into the numbered ticket, the person's ball falls into the seat and the count rolls
up by one (action); the ticket's parts rise in and focus lands on its title (settle). Edit plays it
back and keeps the email. For a newsletter box with no confirmation use a plain form; for a
sign-up with a password use an auth form.
import { WaitlistTicket } from "@/components/ui/waitlist-ticket";<WaitlistTicket preset="banner" count={2317} onSubmit={async (email) => { const res = await fetch("/api/waitlist", { method: "POST", body: JSON.stringify({ email }) }) if (!res.ok) throw new Error("failed") const { position } = await res.json() return position }}> <WaitlistTicket.Badge>Launch · March 12</WaitlistTicket.Badge> <WaitlistTicket.Title>Early access to the scheduling API.</WaitlistTicket.Title> <WaitlistTicket.Copy>Test keys and preview docs, weeks before the API opens.</WaitlistTicket.Copy> <WaitlistTicket.Form hint="One email, at launch." /> <WaitlistTicket.Proof people={[{ initials: "GL" }, { initials: "AR" }, { initials: "SB" }]} /> <WaitlistTicket.Ticket> <WaitlistTicket.Position /> <WaitlistTicket.Note /> <WaitlistTicket.Invite link={(position) => `https://example.com/invite/${position}`} /> <WaitlistTicket.Edit /> </WaitlistTicket.Ticket> <WaitlistTicket.Footnote>No newsletter.</WaitlistTicket.Footnote></WaitlistTicket>
The parts are plain children in the order you write them: the root places Badge, Title and Copy as
the head, Form, Proof and Ticket as the stage, and the Footnote under them. A missing Form
or Ticket uses its defaults (an email field with "Join the list"; Position, Note and Edit). The
form never leaves the DOM. The side that shows sets the slot's height: on join and on Edit what is
below moves once, on the flight's spring, and never jumps.
The root sorts the parts by type: pass them directly or inside fragments, not inside your own
wrapper component (it would hide them and render under the stage).
count is the number of people already on the list, without this person: the proof row shows it
and adds one on join. Four presets set layout, align and reverse; an explicit prop wins:
banner (default): band, the pitch beside the form.
mirror: band with the form on the left.
poster: card, a centered column for a launch page or a last call to action.
strip: inline, one row at the end of an article or a changelog entry; Copy, Note, Invite and
the labels over the position are not shown in it.
defaultJoined renders the ticket at rest (a returning visitor); defaultEmail fills the field.
temperament (calm | lively | playful) tunes motion intensity only; the composition is the same.
Below 420 px of slot width the field and the button stack and the ticket is vertical.
Corners follow your theme's --radius in CSS: the field tile is --radius + 14 px, the ticket
--radius + 10 px, the button concentric inside the tile. Only the surface that flies reads
--radius in px, when the morph starts, so nothing changes size at hydration.
label (default "Work email", screen-reader only in strip); hint: line under the field, hidden in strip; children: Field and Submit; form props
Field
input props except value, type and id; placeholder (default "name@company.com"), name (default "email")
Submit
children: label (default "Join the list"); pendingLabel: announced while onSubmit runs; className
Proof
people (required): { initials }[] placeholder balls; label (default "on the list"); youLabel (default "you included"); initials: the person's ball
Ticket
title: heading, receives focus on arrival; announce: (position) => string for the live region; children: any subset of the four parts below
Position
label: small text over the seat (default "Your seat", hidden in strip); keeps its place, invisible, until the position is known; seat={false} on the root removes it
Note
children: text or (maskedEmail) => node; default "We'll write to m•••@company.com"; not shown in strip
Invite
link (required): string or (position) => string; children: why to invite; copyLabel (default "Copy link"); copiedLabel (default "Link copied"); not shown in strip
Edit
prompt (default "Not you?"); children: button label (default "Edit"); onEdit on the root runs when pressed
The component sends nothing. onSubmit(email) receives the trimmed, valid email and is yours: call
your API, a server action or a provider. While it runs the button shows its pending arc, the field
is read-only and a second submit is ignored. Resolve with the person's position, as a number or
{ position }, and the ticket flies in; the position prop is the fallback. The ticket lays out
its seat from the first render, so nothing moves when the number arrives: if onSubmit never
returns a position, pass seat={false} and the ticket is flat. Throw or reject and nothing flies: the reserved slot under the field shows
errorMessage (a string, or a function of the error) and the field keeps the email so the person
can retry. validate replaces the default email check and returns a message to block the submit;
invalidMessage is the default message. onJoin(email, position) runs once the ticket has been
accepted; onEdit runs when the ticket turns back into the field.
Banner (preset="banner"), every accessory: Badge, Title, Copy, a Form with a hint, Proof, the
four ticket parts. After a beat the prefilled email is submitted once so the ticket shows:
Press mePress me
Launch · March 12
Early access to the scheduling API.
Test keys, preview docs and a direct line to the team, weeks before the API opens to everyone.
Your seat#2,318
You're on the list
We'll write to m•••@company.com
Invite a colleague: you both move up 10 seats.
Not you?
GLARSBFCENMR+2,312
2,31720123456789,3012345678910123456789701234567892,318 on the list
waitlist-ticket · , lively
waitlist-ticket-demo.tsx
Poster (preset="poster", the card layout) with a Footnote under the ticket:
Press mePress me
Launch · March 12
Early access to the scheduling API.
Test keys, preview docs and a direct line to the team, weeks before the API opens to everyone.
Your seat#2,318
You're on the list
We'll write to
Invite a colleague: you both move up 10 seats.
Not you?
GLARSBFCENYOU+2,312
2,31720123456789,3012345678910123456789701234567892,318 on the list
No newsletter. Unsubscribe from the launch email.
waitlist-ticket · , lively
waitlist-ticket-card-demo.tsx
Strip (preset="strip", the inline layout) at the end of a changelog entry: an h3 Title, a
three-ball Proof and a Ticket with only Position and Edit:
Press mePress me
Changelog · v0.9
Recurring slots, time-zone aware reminders and a sandbox with test keys. The public API opens on March 12; early access starts a week before.
Get the API a week early
#2,318
You're on the list
GLARSBYOU+2,314
2,31720123456789,3012345678910123456789701234567892,318 on the list
waitlist-ticket · , lively
waitlist-ticket-inline-demo.tsx
Joined (defaultJoined, position, defaultEmail): the ticket at rest for a returning visitor;
Edit turns it into the field, email kept:
Press mePress me
Launch · March 12
Early access to the scheduling API.
Test keys, preview docs and a direct line to the team, weeks before the API opens to everyone.
You're on the list, position 2,318
Your seat#2,318
You're on the list
We'll write to m•••@company.com
Invite a colleague: you both move up 10 seats.
Not you?
GLARSBFCENMR+2,312
2,31820123456789,3012345678910123456789801234567892,318 on the list
waitlist-ticket · , lively
waitlist-ticket-joined-demo.tsx
Errors (preset="mirror", form on the left): an invalid email shows its message in the reserved
slot and the seat stays shut; the first valid submit rejects with errorMessage, the retry gets a
seat:
Press mePress me
Launch · March 12
Early access to the scheduling API.
Your seat#2,318
You're on the list
We'll write to m•••@company
Invite a colleague: you both move up 10 seats.
Not you?
GLARSBFCENMR+2,312
2,31720123456789,3012345678910123456789701234567892,318 on the list
waitlist-ticket · , lively
waitlist-ticket-errors-demo.tsx
The minimum, without Badge, Copy, Proof or Footnote: a Title and the default Form and Ticket:
Press mePress me
Join the waitlist.
Your seat#2,318
You're on the list
We'll write to
Not you?
waitlist-ticket · , lively
waitlist-ticket-minimal-demo.tsx
Your own pieces: validate, onSubmit resolving { position }, a Proof with its own labels, a
Ticket with a title, a Position label, a Note as a function of the masked email, an Invite with
its text, labels and a link built from the position, an Edit with a prompt, and a Footnote:
The root is a section named by the Title; with no Title it has no name. Reading order is the
DOM order you write, never the animation's.
The field is a labeled input type="email" (autocomplete="email"), described by the hint and,
when set, the error. The error slot is a role="alert" region reserved from the first paint;
aria-invalid is set while it shows.
Submit is a native button; while onSubmit runs the form is aria-busy and a live region says
pendingLabel.
On join a role="status" region announces the ticket (announce, or the position) and focus
lands on the ticket's title; while the ticket shows, the form is hidden from assistive tech.
On Edit focus returns to the field.
The proof row is one img with a name ("2,318 on the list, you included"); balls, the seat and
the perforation are aria-hidden. The copy button is named by copyLabel and confirms with a
live copiedLabel.
Colors are primary, card, border, foreground, muted-foreground and destructive: your
tokens, AA in light and dark.
Hover has a touch alternative: the charge is the press itself, so a tap submits at once.
No flight, fall or roll. The form fades out, then the ticket and its parts fade in, one after the
other and never overlapping; the count changes with a fade and the person's ball is simply in the
row. Edit reverses it the same way. Every part, the position and the error messages are present,
focus still moves to the ticket's title, and hover and focus colors still answer. A sequence that
finishes while the section is off screen or the tab hidden lands without animating.
About 15 KB gzip with its registry dependencies (14.98). The flight is one shared-layout transform
(lib/morph), the fall and the parts move on transform and opacity, driven by motion values and
springs rather than React state. The pending arc pauses off screen and in hidden tabs; at rest
nothing loops and nothing runs per frame. The slot keeps the taller of form and ticket and the
error slot is reserved, so the section has CLS 0: what is below moves once, on the spring, when the
ticket arrives or leaves. The server renders the
form (or the ticket with defaultJoined) complete, with no flash on hydration.
Technical sheet
Motion
calm
260 ms · bounce 0
lively
400 ms · bounce 0.3
playful
540 ms · bounce 0.45
Main spring of each temperament. Set it with the temperament prop or MotionKitProvider; the default is lively.
Size
Not measured yet · budget 16.1 kB gzip
Component and MotionKit helpers; excludes react, react-dom, motion.
Dependencies
class-variance-authority
motion · peer
Triggers
press
Reduced motion
No flight, fall or roll: the form fades out, then the ticket and its parts fade in in turn; the count changes with a fade. Edit reverses it. Every part, the position and the errors are still shown; focus still lands on the title.
Keyboard
Tab / Shift + Tab
Moves through the email field, the submit, then (on the ticket) the invite copy button and Edit
Enter in the field / Enter or Space on Submit
Enter in the field or on Submit submits; Space on Submit: hold to charge, release to submit
Escape on the ticket
Same as Edit: the ticket flies back into the field, the email kept
Enter / Space on Edit and the copy button
Edit returns to the field; the copy button copies the invite link
Browsers
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)