Passkey login
Shown as Wicket, a made-up product
A passkey-first sign-in for a survey team: a calm green statement panel that follows each step, an emailed six-digit code fallback, SAML SSO, and workspace and trust cues.
Installation
pnpm dlx shadcn@latest add "https://propui.dev/r/wicket-login.json?token=…"Adds the piece to components/propui/10-wicket-login/ 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
- A passkey-first sign-in for a product with workspaces, with an emailed code as the fallback.
- Enterprise sign-in where teams can also come in through their organisation with SAML single sign-on.
- A full-screen login where one calm panel carries the product's voice beside the form.
Something else fits when
- Creating an account from an invitation: Sign-up shows what you are joining.
- Confirming one action with a code after sign-in: Code input is built for that.
- A password login: this flow has no password field by design.
Usage
Fills a full window: give it a container with a definite height.
import Piece from "@/components/propui/10-wicket-login/Section";
export default function Page() {
return (
<main className="h-dvh w-full overflow-hidden">
<Piece />
</main>
);
}Change product, workspace, workspaceDomain, statement and facts in data.ts, and pass onSignIn to Wicket to hand the signed-in account to your app. Replace the simulated passkey, email and SAML steps in Wicket.tsx with your auth calls.
Your data
Replace these and everything on screen follows.
product, workspace, workspaceDomainstring- The heading, the workspace card and its address.
statementstring[]- The lines of the statement on the green panel.
facts{ label; value }[]- The three facts at the foot of the panel (release, region, uptime).
lastSync, lastSyncTotal{ survey; when; records: { label; count }[] }, number- The last sync listed on the signed-in step.
demoCode, demoEmailstring- The code the simulated email holds and the account a passkey or SAML sign-in resolves to.
onSignIn(email, method, mode) => void- Called once a sign-in or sign-up succeeds.
Interactions
- Sign in with a passkey: the button waits on the device, then verifies and signs in; Cancel stops it.
- Choose Email me a code instead, enter an address and send; then type, paste or autofill the six digits.
- Enter a wrong code to see the row shake and say so; the sixth digit checks the code on its own.
- Resend a code once the 30-second countdown ends, or change the email.
- Sign in through your organisation with SAML SSO.
- Switch to Create account for the sign-up flow (email, code, welcome) and back.
- Open Try the demo for the demo code; Switch on the workspace card is a placeholder for a workspace picker.
- Once signed in, see the workspace, method, last sync and device memory, and sign out.
Keyboard
- ←or→
- In the code, move between slots.
- Backspace
- In the code, clear the slot, or move back when it is empty.
- Delete
- In the code, clear the slot in place.
- Enter
- Send the email or submit the code.
- Esc
- Close the demo popover.
Behaviour
Read from the code: roles, motion, breakpoints and what runs.
Accessibility
- Each step moves focus to its first control, and the signed-in step focuses its heading.
- Every change is announced through a polite status region and echoed in the footer.
- A cancelled passkey request shows an inline alert; busy buttons use aria-busy and aria-disabled so they stay in the tab order.
- The green panel is a labelled aside; its supporting line follows the step the form is on.
- In forced colours mode the gliding code ring hides and each slot shows a system outline when focused.
Motion
- Steps rise and fade out of a small blur into each other; button labels cross-fade in place and the button springs to the new label's width.
- While a passkey is pending, rings pulse out from the fingerprint mark.
- The panel's supporting line changes with a short rise; the facts settle in once on load and never move again.
- Reduced motion swaps movement for instant changes and stops the pulse.
Responsive
- Above 900px the green panel and the form split the screen side by side.
- Below 900px the statement becomes a short band above the form and the facts hide.
- Below 520px the band is a single statement so the sign-in stays above the fold.
- Below 420px the code slots tighten, and the workspace address can wrap after a dot.
Performance
- Timers run only for the simulated steps and the resend countdown.
- No images: Geist Sans in two weights, Geist Mono for codes, and inline SVG marks.
Notes for AI
Give your coding assistant the Markdown, not a screenshot.
- Keep every product name, statement and fact in data.ts; the panel and the form read them from there.
- Keep the passkey first: the email code is the fallback, not a parallel path.
- Light only. Keep colours in the tokens at the top of post.css.
/p/wicket-login/markdownThe whole library for assistants: llms.txt, or the MCP server in AI tools and MCP.