Login Form
Email and password sign in with remember me, a forgot password link, a slot for social buttons and a footer. Client validation, server errors through props.
import { LoginForm } from "pleate/auth/login-form";Sign in to Plate
Any email, password plate123.
P
Sign in to Plate
Welcome back. Your next trip is waiting.
or
New to Plate? Create an account
Props
- onSubmit
Runs when valid; a thrown Error's message shows as the banner.
({ email, password, remember }) => void | Promise- loading / error / fieldErrors
Busy button, a banner above the fields, and server messages per field (they replace the client ones).
boolean / string / Partial<Record<field, string>>- forgotPasswordHref / forgotPassword
Link target, or your own element (Next Link).
string / ReactNode- showRemember
Remember me checkbox.
booleandefault true- oauth / oauthPosition
Social buttons with an "or" rule.
ReactNode / "top" | "bottom"default "top"- footer / defaultEmail
Links under the form; prefilled email.
ReactNode / string- labels
Every visible string, for your wording or translation.
object
Accessibility
- Labels, descriptions and errors are linked to each field; the first invalid field gets focus on submit.
- autocomplete="username" and "current-password" let password managers fill the form.
- The error banner is a role=alert region.