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.
brutalist/layout/auth-cardSource
"use client";
import { useId, useState, type FormEvent } from "react";
import { cn } from "@/lib/utils";
export interface AuthCardProps {
brand?: string;
title?: string;
onSubmit?: (values: { email: string; password: string }) => void | Promise<void>;
onGithub?: () => void;
error?: string;
forgotHref?: string;
signUpHref?: string;
className?: string;
}
export function AuthCard({
brand = "Shipyard",
title = "Log in",
onSubmit,
onGithub,
error,
forgotHref = "#forgot",
signUpHref = "#sign-up",
className,
}: AuthCardProps) {
const emailId = useId();
const pwId = useId();
const errId = useId();
const [pending, setPending] = useState(false);
async function submit(e: FormEvent<HTMLFormElement>) {
e.preventDefault();
const d = new FormData(e.currentTarget);
setPending(true);
try {
await onSubmit?.({ email: String(d.get("email") ?? ""), password: String(d.get("password") ?? "") });
} finally {
setPending(false);
}
}
const field = "da-focus da-stroke h-12 w-full bg-da-input px-3 text-base text-da-fg";
return (
<div className={cn("grid min-h-full place-items-center bg-da-bg px-4 py-12 text-da-fg [background-image:radial-gradient(var(--da-border)_1.5px,transparent_1.5px)] [background-size:22px_22px]", className)}>
<div className="w-full max-w-sm">
<p className="da-stroke inline-block -rotate-2 bg-da-primary px-3 py-1 font-da-display text-xl tracking-da-display text-da-primary-fg uppercase shadow-da-sm">{brand}</p>
<div className="da-stroke mt-6 bg-da-surface text-da-surface-fg shadow-da-lg">
<h1 className="da-stroke-b bg-da-fg px-6 py-4 font-da-display text-3xl tracking-da-display text-da-bg uppercase">{title}</h1>
<form onSubmit={submit} className="grid gap-4 p-6" aria-describedby={error ? errId : undefined}>
<button type="button" onClick={onGithub} className="da-focus da-stroke flex h-12 items-center justify-center gap-2 bg-da-surface font-bold shadow-da-sm hover:translate-x-[3px] hover:translate-y-[3px] hover:shadow-none">
<svg aria-hidden viewBox="0 0 16 16" className="size-5" fill="currentColor">
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z" />
</svg>
Continue with GitHub
</button>
<p aria-hidden className="text-center font-da-mono text-xs font-bold text-da-muted-fg uppercase">— or —</p>
<div className="grid gap-1.5">
<label htmlFor={emailId} className="font-da-mono text-xs font-bold uppercase">
Email
</label>
<input id={emailId} name="email" type="email" required autoComplete="email" className={field} />
</div>
<div className="grid gap-1.5">
<div className="flex justify-between">
<label htmlFor={pwId} className="font-da-mono text-xs font-bold uppercase">
Password
</label>
<a href={forgotHref} className="da-focus text-xs font-bold underline underline-offset-2">
Forgot?
</a>
</div>
<input id={pwId} name="password" type="password" required minLength={8} autoComplete="current-password" className={field} />
</div>
{error && (
<p id={errId} role="alert" className="da-stroke bg-da-danger px-3 py-2 text-sm font-bold text-da-danger-fg">
{error}
</p>
)}
<button type="submit" disabled={pending} className="da-focus da-stroke mt-2 h-12 bg-da-primary font-bold text-da-primary-fg shadow-da-md hover:translate-x-[6px] hover:translate-y-[6px] hover:shadow-none disabled:opacity-60">
{pending ? "Logging in…" : "Log in →"}
</button>
</form>
</div>
<p className="mt-6 text-center text-sm font-medium">
No account?{" "}
<a href={signUpHref} className="da-focus font-bold underline decoration-[3px] underline-offset-4">
Start free
</a>
</p>
</div>
</div>
);
}
export default AuthCard;
modules/brutalist/layout/auth-card/index.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| brand / title | string | "Shipyard" / "Log in" | Sticker text and h1. |
| onSubmit | (values: { email: string; password: string }) => void | Promise<void> | — | Awaited for the pending state. |
| onGithub | () => void | — | OAuth handler. |
| error | string | — | Error with role=alert. |
| forgotHref / signUpHref | string | — | Links. |
| className | string | — | Classes on the root. |
Other auth screen variants in Brutalist
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 screen in other art directions
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 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.
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 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.