Skip to content

Auth Magic

“Check your inbox” screen: flat envelope with a gently bobbing letter, email in bold, Gmail/Outlook shortcut pills, resend with countdown and change-email link.

soft-flat/layout/auth-magic
Open ↗

Source

"use client";

import { useEffect, useState } from "react";
import { cn } from "@/lib/utils";

export interface AuthMagicProps {
  email?: string;
  onResend?: () => void;
  cooldown?: number;
  mailApps?: { label: string; href: string }[];
  className?: string;
}

/** “Check your inbox” screen: flat envelope illustration with a bouncing letter, email in bold, quick links to open mail apps, resend with countdown and change-email link. */
export function AuthMagic({
  email = "ana@bright.co",
  onResend,
  cooldown = 30,
  mailApps = [
    { label: "Open Gmail", href: "https://mail.google.com" },
    { label: "Open Outlook", href: "https://outlook.live.com" },
  ],
  className,
}: AuthMagicProps) {
  const [left, setLeft] = useState(cooldown);
  useEffect(() => {
    if (left <= 0) return;
    const t = window.setTimeout(() => setLeft((l) => l - 1), 1000);
    return () => window.clearTimeout(t);
  }, [left]);

  return (
    <div className={cn("grid min-h-dvh place-items-center bg-da-bg px-4 py-12 text-da-fg", className)}>
      <main className="w-full max-w-md text-center">
        <div aria-hidden className="relative mx-auto h-40 w-52">
          <div className="sf-letter absolute top-2 left-1/2 h-24 w-36 -translate-x-1/2 rounded-da-md bg-da-surface p-3 shadow-da-md">
            <span className="block h-2 w-20 rounded-full bg-da-primary/30" />
            <span className="mt-2 block h-2 w-24 rounded-full bg-da-muted" />
            <span className="mt-2 block h-2 w-16 rounded-full bg-da-muted" />
          </div>
          <div className="absolute inset-x-0 bottom-0 h-24 rounded-da-lg bg-da-accent" />
          <div className="absolute inset-x-0 bottom-0 h-24 [clip-path:polygon(0_0,50%_55%,100%_0,100%_100%,0_100%)] rounded-da-lg bg-da-warning/80" />
        </div>
        <h1 className="mt-8 font-da-display text-3xl font-extrabold tracking-da-display">Check your inbox 💌</h1>
        <p className="mt-2 text-da-muted-fg">
          We sent a magic link to <span className="font-semibold text-da-fg">{email}</span>. Click it to log in — no password needed.
        </p>
        <div className="mt-8 grid gap-2 sm:grid-cols-2">
          {mailApps.map((m) => (
            <a
              key={m.href}
              href={m.href}
              target="_blank"
              rel="noreferrer"
              className="da-focus da-transition inline-flex h-12 items-center justify-center rounded-da-pill bg-da-surface font-semibold shadow-da-sm hover:-translate-y-0.5"
            >
              {m.label}
            </a>
          ))}
        </div>
        <p className="mt-8 text-sm text-da-muted-fg">
          Didn’t get it?{" "}
          <button
            type="button"
            disabled={left > 0}
            onClick={() => {
              onResend?.();
              setLeft(cooldown);
            }}
            className="da-focus rounded-da-sm font-semibold text-da-fg underline-offset-4 hover:underline disabled:font-normal disabled:text-da-muted-fg disabled:no-underline"
          >
            {left > 0 ? `Resend in ${left}s` : "Resend link"}
          </button>{" "}
          ·{" "}
          <a href="#login" className="da-focus rounded-da-sm font-semibold text-da-fg underline-offset-4 hover:underline">
            Use another email
          </a>
        </p>
      </main>
      <style href="sf-letter" precedence="default">{`
        @keyframes sf-letter { 0%, 100% { translate: -50% 0 } 50% { translate: -50% -10px } }
        .sf-letter { animation: sf-letter 2.4s ease-in-out infinite }
        @media (prefers-reduced-motion: reduce) { .sf-letter { animation: none } }
      `}</style>
    </div>
  );
}

export default AuthMagic;

modules/soft-flat/layout/auth-magic/index.tsx

Props

PropTypeDefaultDescription
emailstring—Address.
onResend() => void—Handler.
cooldownnumber30Seconds.
mailApps{ label, href }[]—Shortcuts.

Other auth screen variants in Soft Flat

Auth screen in other art directions

Auth Card

Centered login card on a dotted paper background: tilted wordmark sticker, ink title band, GitHub button, email + password with forgot link, error slot and a big pressable yellow submit.

BrutalistAuth screen

Auth Magic Link

Passwordless login split screen: blue product panel with staggered pipeline cards (desktop), huge uppercase headline, single email field and yellow send button, then a 'Check your inbox' state with open-mail and retry actions.

BrutalistAuth screen

Auth Screen

Split sign-in / sign-up page: form column with GitHub & Google buttons, email + password (show/hide), remember-me, error slot and pending state; yellow grid panel with a big customer quote on desktop.

BrutalistAuth screen

Auth Signup Steps

Three-step signup wizard: ruled step tabs (done in ink, current in yellow) fused to a card with account fields, team size and use-case tile choices, Back/Continue and a success state.

BrutalistAuth screen

Auth Floating

Sign-up screen: centered glass card (Google button, divider, email magic-link form with success state) surrounded on desktop by floating, bobbing glass preview cards and a gradient orb.

GlassAuth screen

Auth Onboarding

Three-step onboarding glass card: workspace name with URL preview, role radio chips, calendar connection buttons; gradient progress bar, back/continue and a finish screen.

GlassAuth screen

Auth Passkey

Passkey sign-in glass card: glowing gradient fingerprint orb, account email, ‘Sign in with passkey’ with waiting / success / error states and email-link or password fallbacks.

GlassAuth screen

Auth Screen

Centered 40px-blur glass panel over the mesh and two soft orbs: gradient logo, Google/Microsoft buttons, email + password (show/hide), forgot link, error slot, gradient pill submit. Sign-in and sign-up modes.

GlassAuth screen

Auth Screen

Centered passwordless login in three steps: provider choice (Google, email, SAML SSO) → email form → "check your email" confirmation. Faint indigo glow on top, legal footer.

MinimalAuth screen

Auth Split

Split sign-in screen: form on the left (email, password with reveal, remember me, error alert) and an always-dark brand panel with indigo glow, grid, customer quote and three stats on large screens.

MinimalAuth screen

Auth Sso

SSO-first sign-in card on a tinted page: key icon, Google / GitHub / Microsoft buttons, an ‘or use SAML SSO’ divider and work-email discovery with inline arrow submit, legal links below.

MinimalAuth screen

Auth Verify

Email verification screen: mail icon, six single-digit mono boxes (split 3 + 3) with auto-advance, paste, arrow/backspace navigation, auto-submit, error and success states and a resend countdown.

MinimalAuth screen

Auth Centered

Minimal centered sign-in with lots of air: logo, small title, two hairline-boxed fields stacked edge to edge, ink button, “or continue with” text links and a mono legal line at the very bottom.

Mono CleanAuth screen

Auth Magic

Passwordless: a huge “Enter your email” prompt with a single oversized underline input and ↵ button; after submit, a large confirmation with the address and a mono resend link.

Mono CleanAuth screen

Auth Screen

Split sign-in: the left half is an ink panel with a large statement and mono footer; the right half holds a minimal underline form (email, password), an ink button and text links. Panel hides on mobile.

Mono CleanAuth screen

Auth Steps

Three-step sign-up with an index header “01 / 03 — Your account” and segmented hairline progress; underline fields per step, Back text link and ink Continue; final step shows the site address preview.

Mono CleanAuth screen

Auth Screen

Centered sign-in card on a surface-2 page: logo, Google + SSO buttons, “or” divider, email/password (show/hide toggle, forgot link), remember me, blue submit, sign-up link and legal footer.

Neo CorporateAuth screen

Auth Split

Split sign-up page: form on the left (name, work email, company, password with live strength checklist), blue gradient panel on the right with benefits, a customer quote and compliance badges (panel hidden below lg).

Neo CorporateAuth screen

Auth Sso

Enterprise SSO sign-in: email-first step that detects the domain; SSO domains show the org + identity provider and a “Continue with Okta” button, others fall back to a password field.

Neo CorporateAuth screen

Auth Verify

Two-factor verification screen: shield icon, 6 separate digit boxes (auto-advance, backspace, paste support), error/success states, resend with 30s countdown and “use a recovery code” link.

Neo CorporateAuth screen

Auth Magic

Passwordless sign-in: one rounded email field and “Send me a link”, then a gentle sent state with an open-envelope in a sage circle, the address, resend and change-email links.

Organic SoftAuth screen

Auth Onboarding

Post-signup onboarding: two gentle steps (industry as pill radio cards, goals as check cards) with a leaf progress bar, back/continue pills and a warm “all set” finish.

Organic SoftAuth screen

Auth Screen

Centered sign-in on cream with two soft blobs behind a rounded card: serif welcome, filled inputs, password reveal, sage pill submit, Google alternative and a sign-up link.

Organic SoftAuth screen

Auth Split

Split sign-up: form on cream (name, email, company, team-size pills) and an arch-topped landscape illustration panel with sun and hills plus a quote card (hidden below lg).

Organic SoftAuth screen