Auth
authThe parts every Forme sign-in page is built from: a field with a label-row action, a password input with a show toggle, provider buttons, the divider, a testimonial and a row of customer marks. The numbered auth blocks are layouts of these; install this one to build your own.
import { Button } from "@/components/forme/button/button";
import {
AppleIcon,
AuthDescription,
AuthDivider,
AuthField,
ForgotPasswordLink,
AuthLink,
AuthLogo,
AuthTitle,
GitHubIcon,
GoogleIcon,
PasswordInput,
} from "@/components/forme/blocks/auth/auth";
export function AuthDemo() {
return (
<div className="mx-auto grid w-full max-w-sm gap-6">
<div className="grid justify-items-center gap-4 text-center">
<AuthLogo />
<div className="grid gap-1">
<AuthTitle>Sign in to Acme</AuthTitle>
<AuthDescription>Welcome back.</AuthDescription>
</div>
</div>
<form className="grid gap-4">
<AuthField label="Email" name="email" type="email" autoComplete="email" required />
<PasswordInput label="Password" name="password" required action={<ForgotPasswordLink />} />
<Button type="submit" className="w-full">
Sign in
</Button>
</form>
<AuthDivider>Or continue with</AuthDivider>
<div className="grid grid-cols-3 gap-3">
<Button variant="secondary" leadingIcon={GoogleIcon}>
Google
</Button>
<Button variant="secondary" leadingIcon={AppleIcon}>
Apple
</Button>
<Button variant="secondary" leadingIcon={GitHubIcon}>
GitHub
</Button>
</div>
<p className="text-center text-body-regular text-muted-foreground">
Need an account? <AuthLink href="/sign-up">Sign up</AuthLink>
</p>
</div>
);
}Install
Adds the component, its registry dependencies, and the token stylesheet you import once.
API reference
Read from the source, so it is the API of the file you install. A prop marked * is required.
AuthLogo
The brand tile, with an optional wordmark beside it. Replace the glyph with your own mark.
| Prop | Type | Default | Description |
|---|---|---|---|
size | "md" | "lg" | "md" |
Also takes every prop of <span> attributes.
GoogleIcon
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | |
aria-hidden | boolean | "true" | — |
AppleIcon
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | |
aria-hidden | boolean | "true" | — |
GitHubIcon
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | |
aria-hidden | boolean | "true" | — |
AuthTestimonial
A quote, who said it, and an optional rating above. Centred; align it with className.
| Prop | Type | Default | Description |
|---|---|---|---|
quote* | ReactNode | — | |
name* | string | — | |
title* | string | — | What they do and where: "Co-founder, Northwind". |
avatar | string | — | An image URL. Without one the initials stand in. |
rating | boolean | true |
Also takes every prop of <figure> attributes.
AuthLogos
| Prop | Type | Default | Description |
|---|---|---|---|
count | number | 4 |
Also takes every prop of <ul> attributes.
GridPattern
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | |
size | number | 56 |
DotPattern
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — |
The other parts
AuthTitleTakes<h1>attributesAuthDescriptionTakes<p>attributesAuthLinkTakes<a>attributesAuthLegalTakes<p>attributesAuthDividerTakes<div>attributesAuthRatingTakes<div>attributes
Related


Sign in, split with image
A sign-in page with the form on one side and a framed image on the other: email or username, a password with a show toggle and a forgot link, then Google and Apple. The image steps aside on narrow screens.
authentication
ProProviders first, email second
Sign in with Google, GitHub or single sign-on first and a work email as the fallback, with a create-workspace link in the header and customers along the bottom.
authentication
ProSign in card, providers first
A centred sign-in card with Google and Apple above the email-and-password form, for products where one-click sign in is the norm.
authentication