AuthLayout
The centered single-card frame for sign-in, sign-up and consent pages, under the Switchboard wordmark.
Examples
Sign-in card
Heading, one line of description, the form, and a footer link. viewport={false} keeps the preview short.
LightSwitchboard
Sign in to Switchboard
Use the passkey saved on this device, your phone, or a security key.
DarkSwitchboard
Sign in to Switchboard
Use the passkey saved on this device, your phone, or a security key.
<AuthLayout
viewport={false}
heading="Sign in to Switchboard"
description="Use the passkey saved on this device, your phone, or a security key."
footer={
<Text size="sm" tone="ink-2">
New to Switchboard? <Link href="#signup">Create an account</Link>
</Text>
}
>
<Button block icon="key">
Sign in with a passkey
</Button>
</AuthLayout>Wordmark
The name and its 3×3 jack field with one lit jack. Links home; also used as the sidebar header.
Light
Dark
<Wordmark href="/" />Usage
import { AuthLayout, Wordmark } from '@switchboard/ui'
// Body-level: wrap it in the app's Document and add the Toaster.
<Document title="Sign in · Switchboard">
<AuthLayout heading="Sign in to Switchboard" footer={footer}>
<PasskeyForm mode="signin" />
</AuthLayout>
<Toaster flash={flash} />
</Document>Props
Every component also takes mix, for css() and mixins applied after its own style.
AuthLayout
| Prop | Type | Default | Description |
|---|---|---|---|
| heading* | RemixNode | – | The card heading (the page h1). |
| description | RemixNode | – | One line under the heading. |
| footer | RemixNode | – | Card footer, usually a link to the other auth page. |
| viewport | boolean | true | Fill the viewport height and center the card. False for previews. |
| homeHref | string | '/' | Where the wordmark links. |
| children | RemixNode | – | The form. |
Also accepts every <main> attribute.
Wordmark
| Prop | Type | Default | Description |
|---|---|---|---|
| href | string | '/' | Link target. |
Also accepts every <a> attribute.
Accessibility
- Renders the page <main> landmark; the heading is the only h1.
- The wordmark is a link named "Switchboard"; the mark is aria-hidden.
- The card is at most 400px wide and keeps 16px gutters at phone width.
Guidance
Do
- Keep one form per card.
- Put the switch to the other auth page in the footer.
Don’t
- Put a sidebar or topbar around it.
- Render two AuthLayouts on one page outside the docs.