Skip to content

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-corporate/layout/auth-split
Open ↗

Source

"use client";

import { useId, useState, type FormEvent } from "react";
import { Check, CheckCircle2 } from "lucide-react";
import { cn } from "@/lib/utils";

export interface AuthSplitProps {
  brand?: string;
  brandHref?: string;
  title?: string;
  subtitle?: string;
  benefits?: string[];
  quote?: { text: string; name: string; role: string };
  onSubmit?: (data: { name: string; email: string; company: string; password: string }) => void;
  signinHref?: 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>
  );
}

/** 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). */
export function AuthSplit({
  brand = "Ledgerly",
  brandHref = "/",
  title = "Start your 14-day free trial",
  subtitle = "No credit card required. Cancel anytime.",
  benefits = ["Unlimited invoices during the trial", "Connect NetSuite, Xero or QuickBooks", "Free onboarding call with a specialist"],
  quote = { text: "We were sending invoices from Ledgerly the same afternoon we signed up.", name: "Marcus Bell", role: "Controller, Lumen Health" },
  onSubmit,
  signinHref = "#signin",
  className,
}: AuthSplitProps) {
  const id = useId();
  const [pw, setPw] = useState("");
  const [done, setDone] = useState(false);
  const rules = [
    { label: "8+ characters", ok: pw.length >= 8 },
    { label: "A number", ok: /\d/.test(pw) },
    { label: "An uppercase letter", ok: /[A-Z]/.test(pw) },
  ];
  const valid = rules.every((r) => r.ok);
  const submit = (e: FormEvent<HTMLFormElement>) => {
    e.preventDefault();
    if (!valid) return;
    const f = new FormData(e.currentTarget);
    onSubmit?.({ name: String(f.get("name")), email: String(f.get("email")), company: String(f.get("company")), password: pw });
    setDone(true);
  };
  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";
  return (
    <main className={cn("grid min-h-dvh bg-da-bg text-da-fg lg:grid-cols-2", className)}>
      <div className="flex flex-col px-6 py-8 sm:px-12">
        <a href={brandHref} className="da-focus flex w-fit items-center gap-2 rounded-da-sm font-da-display text-lg font-extrabold">
          <LedgerlyMark />
          {brand}
        </a>
        <div className="mx-auto my-auto w-full max-w-sm py-10">
          {done ? (
            <div role="status" className="text-center">
              <CheckCircle2 aria-hidden className="mx-auto size-12 text-da-success" />
              <h1 className="mt-4 font-da-display text-2xl font-extrabold">Check your inbox</h1>
              <p className="mt-2 text-da-muted-fg">We sent a verification link to finish setting up your workspace.</p>
            </div>
          ) : (
            <>
              <h1 className="font-da-display text-2xl font-extrabold tracking-da-display">{title}</h1>
              <p className="mt-1.5 text-sm text-da-muted-fg">{subtitle}</p>
              <form onSubmit={submit} className="mt-8 grid gap-4">
                <div className="grid gap-4 sm:grid-cols-2">
                  <label className="grid gap-1.5 text-sm font-medium">
                    Full name
                    <input name="name" required autoComplete="name" className={field} />
                  </label>
                  <label className="grid gap-1.5 text-sm font-medium">
                    Company
                    <input name="company" required autoComplete="organization" className={field} />
                  </label>
                </div>
                <label className="grid gap-1.5 text-sm font-medium">
                  Work email
                  <input name="email" type="email" required autoComplete="email" className={field} />
                </label>
                <div className="grid gap-1.5">
                  <label htmlFor={`${id}-p`} className="text-sm font-medium">
                    Password
                  </label>
                  <input
                    id={`${id}-p`}
                    type="password"
                    value={pw}
                    onChange={(e) => setPw(e.target.value)}
                    required
                    autoComplete="new-password"
                    aria-describedby={`${id}-r`}
                    className={field}
                  />
                  <ul id={`${id}-r`} className="mt-1 flex flex-wrap gap-x-4 gap-y-1 text-xs" aria-label="Password requirements">
                    {rules.map((r) => (
                      <li key={r.label} className={cn("flex items-center gap-1", r.ok ? "text-da-success" : "text-da-muted-fg")}>
                        <Check aria-hidden className={cn("size-3.5", !r.ok && "opacity-40")} strokeWidth={3} />
                        {r.label}
                        <span className="sr-only">{r.ok ? " (met)" : " (not met)"}</span>
                      </li>
                    ))}
                  </ul>
                </div>
                <button
                  type="submit"
                  aria-disabled={!valid}
                  className={cn(
                    "da-focus da-transition mt-2 h-10 rounded-da-md bg-da-primary text-sm font-semibold text-da-primary-fg hover:bg-da-primary/90",
                    !valid && "opacity-60",
                  )}
                >
                  Create account
                </button>
                <p className="text-xs text-da-muted-fg">By creating an account you agree to the Terms of Service and Privacy Policy.</p>
              </form>
              <p className="mt-8 text-sm text-da-muted-fg">
                Already have an account?{" "}
                <a href={signinHref} className="da-focus rounded-da-sm font-semibold text-da-primary hover:underline">
                  Sign in
                </a>
              </p>
            </>
          )}
        </div>
      </div>
      <aside className="relative hidden overflow-hidden bg-[linear-gradient(150deg,var(--da-primary),color-mix(in_oklab,var(--da-primary)_65%,var(--da-fg)))] p-12 text-da-primary-fg lg:flex lg:flex-col lg:justify-center">
        <div
          aria-hidden
          className="absolute inset-0 opacity-15 [background-image:linear-gradient(currentColor_1px,transparent_1px),linear-gradient(90deg,currentColor_1px,transparent_1px)] [background-size:44px_44px] [mask-image:radial-gradient(circle_at_80%_20%,black,transparent_70%)]"
        />
        <div className="relative max-w-md">
          <h2 className="font-da-display text-2xl font-extrabold">Everything you get on day one</h2>
          <ul className="mt-6 space-y-3">
            {benefits.map((b) => (
              <li key={b} className="flex items-center gap-3">
                <span aria-hidden className="grid size-6 place-items-center rounded-full bg-da-primary-fg/15">
                  <Check className="size-3.5" strokeWidth={3} />
                </span>
                {b}
              </li>
            ))}
          </ul>
          <figure className="mt-12 rounded-da-lg bg-da-primary-fg/10 p-6">
            <blockquote className="text-lg leading-snug font-medium">“{quote.text}”</blockquote>
            <figcaption className="mt-4 text-sm opacity-85">
              <span className="font-semibold">{quote.name}</span> · {quote.role}
            </figcaption>
          </figure>
          <p className="mt-8 text-xs font-semibold tracking-da-label uppercase opacity-80">SOC 2 Type II · ISO 27001 · GDPR</p>
        </div>
      </aside>
    </main>
  );
}

export default AuthSplit;

modules/neo-corporate/layout/auth-split/index.tsx

Props

PropTypeDefaultDescription
brandstring—Brand name.
brandHrefstring—Brand link target.
titlestring—Heading.
subtitlestring—Subtitle.
benefitsstring[]—Benefits.
quote{ text: string; name: string; role: string }—Quote.
onSubmit(data: { name: string; email: string; company: string; password: string }) => void—Callback.
signinHrefstring—Signin Href.
classNamestring—Extra classes on the root.

Other auth screen variants in Neo Corporate

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 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

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 FlatAuth screen

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.

Soft FlatAuth screen

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.

Soft FlatAuth screen

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.

Soft FlatAuth screen