@objectifthunes/whiteboard
SAAS PATTERNS

Auth screens

AuthShell, AuthCard and OAuthRow — the frame, card and single-sign-on row every signed-out screen shares.


PREVIEW
◈

Sign in to My Whiteboard

One place for your boards, your clients and your invoices.

or
Forgot password?

SOURCE
import { AuthShell, AuthCard, OAuthRow, PasswordField } from '@objectifthunes/whiteboard'

<AuthShell
  aside={<Testimonial />}                    {/* hidden under 880px */}
  footer={<>By continuing you accept the <a href="/terms">terms</a>.</>}
>
  <AuthCard
    brand={<Logo />}
    title="Sign in to My Whiteboard"
    lede="One place for your boards, your clients and your invoices."
    footer={<>No account? <ButtonLink href="/signup" variant="secondary">Create one</ButtonLink></>}
  >
    <OAuthRow providers={[
      { id: 'google', label: 'Google', icon: <GoogleMark />, onClick: () => signIn('google') },
      { id: 'github', label: 'GitHub', icon: <GithubMark />, onClick: () => signIn('github') },
    ]} />

    <form onSubmit={submit}>
      <Field label="Email"><Input type="email" autoComplete="username" /></Field>
      <PasswordField autoComplete="current-password" />
      <Button type="submit" fullWidth loading={busy}>Sign in</Button>
    </form>
  </AuthCard>
</AuthShell>
NOTES

Three pieces. AuthShell is the full-viewport frame with an optional decorative panel; AuthCard is the bordered card; OAuthRowis the single-sign-on buttons with the "or" rule under them. The preview shows the card alone, since the shell would take over the page — the full sign-in screen shows all three together.

OAuthRow ships no provider logos on purpose. Google, GitHub and Apple all have brand rules about their marks, and a UI kit guessing at them is how you end up with a stale or non-compliant logo. Pass icon per provider.

One or two providers share a row; three or more stack, because squeezing four buttons onto one line makes each unreadable. Override with stacked.

Wrap the body in your own <form> so submit-on-Enter works — the card takes no opinion on your fields, validation or submit handler. The footer slot sits outside the card body, which is where the legal links belong rather than inside the form.