Passwordless email entry that sends a single-use sign-in link.
We'll email you a link for password-free sign-in.
Prefer a password? Sign in
Install with the CLI, or add the packages and paste the source below.
Add Magic Link to your app with its source-owned dependencies.
npx cooud-ui add magic-link
Install the Cooud UI packages, then paste the block below.
Copy the source for Request link. Every class is a semantic token, so it re-themes with your app.
import {Button,Card,CardContent,CardFooter,CardHeader,CardTitle,Input,Label,Separator,} from "@cooud-ui/ui";import { Chrome, Github, Sparkles } from "lucide-react";export function MagicLinkBlock() {return (<div className="flex w-full items-center justify-center py-4"><Card className="w-full max-w-sm gap-6 shadow-lg"><CardHeader className="flex flex-col items-center gap-3 text-center"><span className="inline-flex size-11 items-center justify-center rounded-xl bg-gradient-primary text-primary-foreground shadow-glow"><Sparkles className="size-5" aria-hidden="true" /></span><div className="flex flex-col gap-1"><CardTitle className="font-display text-xl">Sign in with a magic link</CardTitle><p className="text-sm text-fg-secondary">We'll email you a link for password-free sign-in.</p></div></CardHeader><CardContent className="flex flex-col gap-4"><div className="flex flex-col gap-2"><Label htmlFor="magic-email">Email</Label><Input id="magic-email" type="email" placeholder="you@company.com" autoComplete="email" /></div><Button variant="gradient" size="lg" className="w-full">Send magic link</Button><div className="flex items-center gap-3"><Separator className="flex-1" /><span className="text-xs text-fg-tertiary">or continue with</span><Separator className="flex-1" /></div><div className="grid grid-cols-2 gap-3"><Button variant="outline"><Github className="size-4" aria-hidden="true" />GitHub</Button><Button variant="outline"><Chrome className="size-4" aria-hidden="true" /></Button></div></CardContent><CardFooter className="justify-center"><p className="text-sm text-fg-secondary">Prefer a password?{" "}<ahref="#signin"className="font-medium text-primary underline-offset-4 hover:underline">Sign in</a></p></CardFooter></Card></div>);}
We'll email you a link for password-free sign-in.
Prefer a password? Sign in