Sign-up
Shown as Enlist, a made-up product
An invitation sign-up for a book club: fields that check themselves as you leave them, a password read-out that names the next step, and a finish that adds you to the readers.
Installation
pnpm dlx shadcn@latest add "https://propui.dev/r/enlist-signup.json?token=…"Adds the piece to components/propui/01-enlist-signup/ and installs motion. Needs a free account: sign in and the command includes your token. Fonts load from Prop UI; download the zip to self-host them.
When to use
Reach for it when
- Signing someone up from an invitation, where the thing they are joining sits above the form.
- A short account form (name, email, password) that should explain each problem in place.
- Offering a passkey and an email link next to a classic password form.
Something else fits when
- Signing in an existing person: Passkey login is built around passkeys and a code fallback.
- A long onboarding with many steps or questions: use a multi-step form.
- A sign-up with no context to show: the club header is half of this card.
Usage
Fills a full window: give it a container with a definite height.
import Piece from "@/components/propui/01-enlist-signup/Section";
export default function Page() {
return (
<main className="h-dvh w-full overflow-hidden">
<Piece />
</main>
);
}Replace CLUB in data.ts with your group or workspace (and the portraits in photos/), and pass onSubmit to Enlist to create the account; throw an Error from it and its message shows above the button. TAKEN and SSO_PERSON only feed the demo.
Your data
Replace these and everything on screen follows.
CLUB{ name; inviter; faces: Reader[]; readers; book; meeting; inviteExpiresOn }- The invitation header, the reader stack and count, and the calendar file on the finished step.
Reader{ initials; name; tone; photo? }- One face in the stack; initials show when there is no photo.
SSO_PERSON{ name; email }- Who a simulated passkey or email link resolves to.
TAKENSet<string>- Addresses that already belong to a reader, so the demo can show the submit error.
onSubmit(details: EnlistDetails) => void | Promise<void>- Creates the account; a thrown Error becomes the message above the submit button.
Interactions
- Fill in name, email and password; each field checks itself when you leave it and draws a tick when it is good.
- Watch the password meter: four bars, and a line that names the one change that would make it stronger.
- Show or hide the password with the eye button.
- Submit with a missing value: every problem shows at once and focus moves to the first one.
- Sign up with ines@okafor.co to see the already-a-reader error.
- Continue with a passkey or an email link to join as a sample person; the finished step names the method you used.
- On the finished step, add the first meeting to your calendar (an .ics file), open chapter 1 or start over.
Keyboard
- TaborShift+Tab
- Move through the passkey and email link buttons, fields, checkbox and links.
- Enter
- In any field, submit the form.
- Space
- Toggle the next-book emails checkbox, or press the focused button.
Behaviour
Read from the code: roles, motion, breakpoints and what runs.
Accessibility
- Every field has a visible label; errors are tied to their field with aria-describedby and aria-invalid.
- The password read-out is the field's description, so a screen reader hears the advice, not just the bars.
- A submit with problems moves focus to the first field that has one; an error from onSubmit is announced as an alert.
- The footer status is a polite live region that announces each step: creating, joined, errors.
- The passkey and email link buttons are named in full for screen readers ("Continue with a passkey").
- Busy buttons stay in place with aria-disabled instead of disappearing from the tab order.
Motion
- Steps cross over sideways out of a small blur, and the card's height follows on a spring.
- Your initials spring into the reader stack and the count rolls from 11 to 12 when you join.
- Reduced motion makes every change instant.
Responsive
- The card is one column at every width and centred on the page.
- When the card is narrower than 400px (a container query) its padding tightens, the heading steps down and the reader stack in the header hides.
- Below 520px the card sits at the top of the screen instead of the middle.
Performance
- Nothing runs until you interact; there is no timer or animation loop at rest.
- Two local font files (Inter, and Newsreader italic for the book title), inline SVG, and four bundled 192px portraits (about 10 KB each) that load lazily.
Notes for AI
Give your coding assistant the Markdown, not a screenshot.
- Keep the club's facts in data.ts; the header, stack, count and calendar file all read from CLUB. Portraits are static imports from photos/; never hotlink images.
- Validation messages live in getErrors() and the password advice in readPassword() in Enlist.tsx; change them there, not in the markup.
- Light only. Keep colours in the tokens at the top of post.css.
/p/enlist-signup/markdownThe whole library for assistants: llms.txt, or the MCP server in AI tools and MCP.