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-corporate/layout/auth-screenSource
"use client";
import { useId, useState, type FormEvent } from "react";
import { Eye, EyeOff, KeyRound } from "lucide-react";
import { cn } from "@/lib/utils";
export interface AuthScreenProps {
brand?: string;
brandHref?: string;
title?: string;
onSubmit?: (data: { email: string; password: string; remember: boolean }) => void;
signupHref?: string;
forgotHref?: string;
className?: string;
}
function LedgerlyMark({ className }: { className?: string }) {
return (
<svg aria-hidden viewBox="0 0 28 28" className={cn("size-7 shrink-0", className)}>
<rect width="28" height="28" rx="7" fill="var(--da-primary)" />
<path d="M8 8v12h12" stroke="var(--da-primary-fg)" strokeWidth="2.6" fill="none" strokeLinecap="round" />
<path d="M13 15h7M13 11h7" stroke="var(--da-primary-fg)" strokeWidth="2.2" strokeLinecap="round" opacity=".7" />
</svg>
);
}
function GoogleIcon() {
return (
<svg aria-hidden viewBox="0 0 24 24" className="size-4">
<path fill="#4285F4" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.27-4.74 3.27-8.1z" />
<path
fill="#34A853"
d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84A11 11 0 0 0 12 23z"
/>
<path fill="#FBBC05" d="M5.84 14.09A6.6 6.6 0 0 1 5.5 12c0-.73.13-1.43.34-2.09V7.07H2.18A11 11 0 0 0 1 12c0 1.78.43 3.45 1.18 4.93l3.66-2.84z" />
<path
fill="#EA4335"
d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1A11 11 0 0 0 2.18 7.07l3.66 2.84C6.71 7.31 9.14 5.38 12 5.38z"
/>
</svg>
);
}
/** 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. */
export function AuthScreen({
brand = "Ledgerly",
brandHref = "/",
title = "Sign in to Ledgerly",
onSubmit,
signupHref = "#signup",
forgotHref = "#forgot",
className,
}: AuthScreenProps) {
const id = useId();
const [show, setShow] = useState(false);
const [error, setError] = useState("");
const submit = (e: FormEvent<HTMLFormElement>) => {
e.preventDefault();
const f = new FormData(e.currentTarget);
const password = String(f.get("password"));
if (password.length < 8) return setError("Password must be at least 8 characters.");
setError("");
onSubmit?.({ email: String(f.get("email")), password, remember: f.get("remember") === "on" });
};
const field =
"da-stroke da-transition h-10 w-full rounded-da-md bg-da-surface px-3 text-sm shadow-da-sm outline-none focus:border-da-primary focus:ring-3 focus:ring-da-ring/25";
const alt =
"da-focus da-stroke da-transition inline-flex h-10 items-center justify-center gap-2 rounded-da-md bg-da-surface text-sm font-semibold shadow-da-sm hover:bg-da-surface-2";
return (
<main className={cn("grid min-h-dvh place-items-center bg-da-surface-2 px-4 py-12 text-da-fg", className)}>
<div className="w-full max-w-sm">
<a href={brandHref} className="da-focus mx-auto flex w-fit items-center gap-2 rounded-da-sm font-da-display text-lg font-extrabold">
<LedgerlyMark />
{brand}
</a>
<div className="da-stroke mt-8 rounded-da-lg bg-da-surface p-6 text-da-surface-fg shadow-da-md sm:p-8">
<h1 className="font-da-display text-xl font-bold">{title}</h1>
<div className="mt-6 grid grid-cols-2 gap-2">
<button type="button" className={alt}>
<GoogleIcon /> Google
</button>
<button type="button" className={alt}>
<KeyRound aria-hidden className="size-4" /> SSO
</button>
</div>
<p className="my-6 flex items-center gap-3 text-xs text-da-muted-fg before:h-px before:flex-1 before:bg-da-border after:h-px after:flex-1 after:bg-da-border">
or
</p>
<form onSubmit={submit} className="grid gap-4" noValidate={false}>
<div className="grid gap-1.5">
<label htmlFor={`${id}-e`} className="text-sm font-medium">
Work email
</label>
<input id={`${id}-e`} name="email" type="email" required autoComplete="email" defaultValue="priya@northwind.com" className={field} />
</div>
<div className="grid gap-1.5">
<div className="flex justify-between">
<label htmlFor={`${id}-p`} className="text-sm font-medium">
Password
</label>
<a href={forgotHref} className="da-focus rounded-da-sm text-sm font-medium text-da-primary hover:underline">
Forgot password?
</a>
</div>
<div className="relative">
<input
id={`${id}-p`}
name="password"
type={show ? "text" : "password"}
required
autoComplete="current-password"
aria-invalid={error ? true : undefined}
aria-describedby={error ? `${id}-err` : undefined}
className={cn(field, "pr-10", error && "border-da-danger")}
/>
<button
type="button"
onClick={() => setShow(!show)}
aria-label={show ? "Hide password" : "Show password"}
aria-pressed={show}
className="da-focus absolute top-1/2 right-1 grid size-8 -translate-y-1/2 place-items-center rounded-da-sm text-da-muted-fg hover:text-da-fg"
>
{show ? <EyeOff aria-hidden className="size-4" /> : <Eye aria-hidden className="size-4" />}
</button>
</div>
{error && (
<p id={`${id}-err`} className="text-xs font-medium text-da-danger">
{error}
</p>
)}
</div>
<label className="flex items-center gap-2 text-sm">
<input type="checkbox" name="remember" defaultChecked className="da-focus size-4 accent-(--da-primary)" />
Keep me signed in for 30 days
</label>
<button
type="submit"
className="da-focus da-transition h-10 rounded-da-md bg-da-primary text-sm font-semibold text-da-primary-fg hover:bg-da-primary/90"
>
Sign in
</button>
</form>
</div>
<p className="mt-6 text-center text-sm text-da-muted-fg">
New to {brand}?{" "}
<a href={signupHref} className="da-focus rounded-da-sm font-semibold text-da-primary hover:underline">
Start a free trial
</a>
</p>
<p className="mt-8 text-center text-xs text-da-muted-fg">© 2026 {brand}, Inc. · Privacy · Terms</p>
</div>
</main>
);
}
export default AuthScreen;
modules/neo-corporate/layout/auth-screen/index.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| brand | string | — | Brand name. |
| brandHref | string | — | Brand link target. |
| title | string | — | Heading. |
| onSubmit | (data: { email: string; password: string; remember: boolean }) => void | — | Callback. |
| signupHref | string | — | Signup Href. |
| forgotHref | string | — | Forgot Href. |
| className | string | — | Extra classes on the root. |
Other auth screen variants in Neo Corporate
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
Auth Screen
Centered friendly sign-in: big rounded white card among pastel shapes, shape logo, Google button, rounded divider, soft email/password fields with reveal, error alert and periwinkle pill.
Auth Split
Sign-up split: lavender panel with a flat illustration of tilted task cards and perk list on large screens, roomy name + email form with a success message on the other side.
Auth Welcome
First-run profile setup: big live avatar preview, grid of pastel emoji avatars (native radios), display-name field with preview chip and a “Let’s go” button enabled once named.