GitHub

Magic Link Form

Block
Passwordless login form that sends magic link via email

Basic Usage

Loading...

Installation

pnpm add @corew500/ui

Usage

import { MagicLinkForm } from "@corew500/ui/blocks/magic-link-form"

<MagicLinkForm>Content</MagicLinkForm>

API Reference

Props

PropTypeDefaultDescription
onFormSubmit(data: MagicLinkFormData) => voidCalled when the form is submitted
onResend() => voidCalled when resend is clicked
loadingenumfalseWhether the form is in a loading state
successenumfalseWhen true, shows success state instead of form
glowenumfalseEnable glow effects
titlestringSign in with magic link
descriptionstringEnter your email and we'll send you a magic link to sign in instantly.
successTitlestringCheck your email
successDescriptionstringWe've sent you a magic link to sign in.
successSubDescriptionstringClick the link in your email to continue. If you don't see it, check your spam folder.
successActionenum
labels{ email?: string; }{}
placeholders{ email?: string; }{}
buttonLabels{ submit?: string; loading?: string; resend?: string; resendCooldown?: string; backToLogin?: string; }{}
errors{ email?: string; general?: string; }{}
backToLoginHrefstring#
resendCooldownnumber60Resend cooldown in seconds