Skip to content

No.376 · Authentication

Passkey Sign-in

Biometric-first sign-in: the fingerprint's ridges draw themselves in, ring by ring, while it verifies — then gather into a single check. Email stays a quiet fallback.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

Written for the variant you picked above: Night

Design a passkey-first sign-in where the fingerprint is the progress indicator. A 120px rounded tile holds a stylised fingerprint made of eight separate ridge paths (concentric, slightly broken arcs, centre first). Each ridge exists twice: a faint base and an accent 'ink' copy with pathLength=1 and dashoffset 1. Starting the ceremony (the tile or the primary button) draws the ink ridges in from the centre outward, 170ms apart over 900ms, while a soft accent scan band sweeps up and down the tile. On success the ridges fade out in a quick ripple as a single check draws in their place (520ms, 280ms delay), the tile gains a green ring and halo, and the heading becomes 'Welcome back, Hamza'. On failure the print shivers, the ridges turn rose and drain back out, and the status explains what to do. Below: an Instrument Serif heading, a polite status line, a full-width primary button whose label follows the state, and a quiet 'Use email instead' link that folds open an email field and 'Send link'. The verify callback obtains a WebAuthn credential and verifies the assertion on the server; resolve true only after server verification succeeds. Require an async verify callback. Catch cancellation and network errors, return to a retryable failure state, and prevent duplicate requests. Show the email fallback only when onSendLink is provided; submit the email through that callback and announce success or failure. Make the welcome name configurable. Keep fake verification in the demo only. Selected variant — Night (night): Apply the night theme. Where the brief above gives no colour values for it, choose a restrained night palette with text at 4.5:1 contrast or better. Keep the geometry, states and motion described above unchanged. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Tap the print or Continue with passkey; on failure, Try again; or open the email fallback. Motion: Ridges draw centre-out (170ms stagger, 900ms), scan band 1.3s alternate, success check 520ms, failure shiver 420ms and drain 700ms, fallback fold 420ms. Accessibility: Both the print and the primary button are labelled buttons; status is a polite live region; the email fallback is a disclosure with aria-expanded and real inputs (16px to avoid iOS zoom). Reduced motion switches states instantly. Responsive behavior: Fluid to 22rem; centred. Touch: Designed for taps; the email field uses the email keyboard. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

Notes

Interaction
Tap the print or Continue with passkey; on failure, Try again; or open the email fallback.
Motion
Ridges draw centre-out (170ms stagger, 900ms), scan band 1.3s alternate, success check 520ms, failure shiver 420ms and drain 700ms, fallback fold 420ms.
Accessibility
Both the print and the primary button are labelled buttons; status is a polite live region; the email fallback is a disclosure with aria-expanded and real inputs (16px to avoid iOS zoom). Reduced motion switches states instantly.
Responsive
Fluid to 22rem; centred.
On touch
Designed for taps; the email field uses the email keyboard.