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.
glass/layout/auth-onboardingSource
"use client";
import { useId, useState } from "react";
import { ArrowLeft, ArrowRight, CalendarDays, Check } from "lucide-react";
import { cn } from "@/lib/utils";
export interface AuthOnboardingProps {
onFinish?: (data: { workspace: string; role: string; calendar: string | null }) => void;
className?: string;
}
const GLASS = "da-stroke bg-da-surface backdrop-blur-da backdrop-saturate-150";
const STEPS = ["Workspace", "Your role", "Calendar"];
const ROLES = ["Product", "Engineering", "Design", "Sales", "Leadership", "Other"];
/** Three-step onboarding in a glass card: workspace name, role chips, calendar connection; gradient progress bar, back/next and a finish state. */
export function AuthOnboarding({ onFinish, className }: AuthOnboardingProps) {
const id = useId();
const [step, setStep] = useState(0);
const [workspace, setWorkspace] = useState("Lumen");
const [role, setRole] = useState("Product");
const [calendar, setCalendar] = useState<string | null>(null);
const [done, setDone] = useState(false);
const next = () => {
if (step < 2) setStep(step + 1);
else {
setDone(true);
onFinish?.({ workspace, role, calendar });
}
};
return (
<div className={cn("grid min-h-dvh place-items-center px-4 py-12 text-da-fg", className)}>
<main className={cn("w-full max-w-md rounded-da-lg p-8 shadow-da-lg", GLASS)}>
{done ? (
<div className="text-center" role="status">
<span
aria-hidden
className="mx-auto grid size-16 place-items-center rounded-full bg-gradient-to-br from-da-primary to-da-accent text-da-primary-fg shadow-da-lg"
>
<Check className="size-8" />
</span>
<h1 className="mt-6 font-da-display text-2xl font-semibold tracking-da-display">You’re all set, {workspace}!</h1>
<p className="mt-2 text-da-muted-fg">Halo will join your next meeting{calendar ? ` from ${calendar}` : ""}. Your first recap lands right after.</p>
<a href="#app" className="da-focus mt-8 inline-flex h-12 items-center rounded-da-pill bg-da-fg px-6 font-semibold text-da-bg">
Go to my meetings
</a>
</div>
) : (
<>
<div className="flex items-center justify-between text-xs font-semibold text-da-muted-fg">
<span>
Step {step + 1} of {STEPS.length}
</span>
<span>{STEPS[step]}</span>
</div>
<div
className="mt-2 h-1.5 overflow-hidden rounded-full bg-da-muted"
role="progressbar"
aria-valuemin={1}
aria-valuemax={3}
aria-valuenow={step + 1}
aria-label="Onboarding progress"
>
<div
className="h-full rounded-full bg-gradient-to-r from-da-primary to-da-accent transition-[width] duration-(--da-duration-slow) ease-da"
style={{ width: `${((step + 1) / 3) * 100}%` }}
/>
</div>
{step === 0 && (
<section className="mt-8">
<h1 className="font-da-display text-2xl font-semibold tracking-da-display">Name your workspace</h1>
<p className="mt-1 text-sm text-da-muted-fg">Usually your company or team name.</p>
<label htmlFor={`${id}-ws`} className="mt-6 block text-sm font-semibold">
Workspace name
</label>
<input
id={`${id}-ws`}
value={workspace}
onChange={(e) => setWorkspace(e.target.value)}
className="da-focus da-stroke mt-2 h-12 w-full rounded-da-pill bg-da-input px-5"
/>
<p className="mt-2 font-da-mono text-xs text-da-muted-fg">halo.app/{workspace.toLowerCase().replace(/[^a-z0-9]+/g, "-") || "…"}</p>
</section>
)}
{step === 1 && (
<fieldset className="mt-8">
<legend className="font-da-display text-2xl font-semibold tracking-da-display">What do you do?</legend>
<p className="mt-1 text-sm text-da-muted-fg">We’ll tailor your recap templates.</p>
<div className="mt-6 grid grid-cols-2 gap-2 sm:grid-cols-3">
{ROLES.map((r) => (
<label
key={r}
className={cn(
"da-transition cursor-pointer rounded-da-pill px-3 py-2.5 text-center text-sm font-medium has-focus-visible:ring-(length:--da-ring-width) has-focus-visible:ring-da-ring",
role === r
? "bg-gradient-to-r from-da-primary to-da-accent text-da-primary-fg shadow-da-sm"
: "da-stroke bg-da-surface hover:bg-da-secondary",
)}
>
<input type="radio" name={`${id}-role`} value={r} checked={role === r} onChange={() => setRole(r)} className="sr-only" />
{r}
</label>
))}
</div>
</fieldset>
)}
{step === 2 && (
<section className="mt-8">
<h1 className="font-da-display text-2xl font-semibold tracking-da-display">Connect your calendar</h1>
<p className="mt-1 text-sm text-da-muted-fg">Halo joins meetings you choose. You can skip this.</p>
<div className="mt-6 grid gap-2">
{["Google Calendar", "Outlook"].map((c) => (
<button
key={c}
type="button"
aria-pressed={calendar === c}
onClick={() => setCalendar(calendar === c ? null : c)}
className={cn(
"da-focus da-transition flex h-14 items-center gap-3 rounded-da-md px-4 text-left font-semibold",
calendar === c ? "bg-da-success/15 ring-2 ring-da-success" : "da-stroke bg-da-surface hover:bg-da-secondary",
)}
>
<CalendarDays aria-hidden className="size-5 text-da-primary" />
<span className="flex-1">{c}</span>
{calendar === c && (
<span className="inline-flex items-center gap-1 text-xs text-da-success">
<Check aria-hidden className="size-4" /> Connected
</span>
)}
</button>
))}
</div>
</section>
)}
<div className="mt-8 flex items-center justify-between">
<button
type="button"
onClick={() => setStep((s) => Math.max(0, s - 1))}
disabled={step === 0}
className="da-focus inline-flex h-11 items-center gap-1.5 rounded-da-pill px-4 text-sm font-semibold text-da-muted-fg hover:text-da-fg disabled:invisible"
>
<ArrowLeft aria-hidden className="size-4" /> Back
</button>
<button
type="button"
onClick={next}
disabled={step === 0 && !workspace.trim()}
className="da-focus da-transition inline-flex h-11 items-center gap-1.5 rounded-da-pill bg-gradient-to-r from-da-primary to-da-accent px-5 text-sm font-semibold text-da-primary-fg shadow-da-md hover:-translate-y-0.5 disabled:opacity-60"
>
{step === 2 ? (calendar ? "Finish" : "Skip & finish") : "Continue"} <ArrowRight aria-hidden className="size-4" />
</button>
</div>
</>
)}
</main>
</div>
);
}
export default AuthOnboarding;
modules/glass/layout/auth-onboarding/index.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| onFinish | ({ workspace, role, calendar }) => void | — | Completion handler. |
| className | string | — | Classes. |
Other auth screen variants in Glass
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 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 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 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.