Component packs › Latch › Magic Link
Press send and a letter rises out of the button, folds into an envelope, seals and slides back into a slot; then the resend timer runs round the button’s edge.
Magic Link is a passwordless sign-in from Latch, a component pack with 8 components: Form and sign-in components that work like little mechanisms. Price: $2 for the whole pack.
Built with: folding letter, edge timer, email check.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | ||
hint | string | Line under the title. | |
send | (email: string) => Promise<void> | waits 0.6 s | Send the link. Resolve when sent, reject to show an error. Default: waits 0.6 s. |
resendAfter | number | 30 | Seconds before the link can be sent again. Default 30. |
theme | 'dark' | 'light' | ||
autoplay | boolean | Showcase mode: types an address and sends, again and again, until touched. |
readonly email: stringreset(): voiddestroy(): voidimport MagicLink from './MagicLink';
<MagicLink />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Form and sign-in components.