Login page

Centered sign-in card built from Card, Input, and Button — with an optional “Continue with Google” button.

Welcome back

Enter your email and we'll send you a one-time code.

*
or

Don't have an account? Sign up

Installation
$Terminal
npx shadcn@latest add https://sdk-components.thesqd.com/r/login-page.json
Usage
Drop the block onto your sign-in route. Wire `onSubmit` to your credential flow and `onGoogle` to your OAuth handler.
TSImport
import { LoginPage } from "@/components/blocks/login-page";
TSExample
import { LoginPage } from "@/components/blocks/login-page";

export function SignInPage() {
  return (
    <LoginPage
      title="Welcome back"
      description="Sign in to your account to continue."
      googleEnabled
      forgotHref="/forgot-password"
      onGoogle={() => signInWithGoogle()}
      onSubmit={({ email, password }) => signIn(email, password)}
    />
  );
}
Composition
A single LoginPage component with prop-driven header, optional Google button, email/password form, and footer.
LoginPage                        — auth card (Card + TextField + OtpField + Button)
├── header
│   ├── logo                     — optional brand mark
│   └── SectionHeader            — size="lg" title + description
├── email step
│   ├── TextField — email     (AtSignIcon leading)
│   ├── TextField — password  (LockIcon leading, + "Forgot password?" link)
│   │                            hidden when otp
│   ├── Button    — full-width submit ("Sign in" / "Send code")
│   ├── google (googleEnabled)  — "or" divider + "Continue with Google"
│   └── footer                  — "Don't have an account? Sign up"
└── code step (otp, after submit)
    ├── OtpField  — 6-digit verification code
    ├── Button    — "Verify" (disabled until full)
    └── back link — "← Use a different email"
Email & password
Card with email + password inputs, a forgot-password link, a full-width submit button, and a sign-up footer.

Welcome back

Sign in to your account to continue.

*

Don't have an account? Sign up

Login with Google
Pass `googleEnabled` to surface a “Continue with Google” button and an `or` divider below the email form.

Welcome back

Sign in to your account to continue.

*
or

Don't have an account? Sign up

One-time code
Pass `otp` for a passwordless flow — submit the email to request a code, then verify it in the OTP field on the next step.

Welcome back

Enter your email and we'll send you a one-time code.

*

Don't have an account? Sign up

One-time code + Google
Combine `otp` and `googleEnabled` for a fully passwordless card — email code plus a Google button.

Welcome back

Enter your email and we'll send you a one-time code.

*
or

Don't have an account? Sign up

API Reference
Props for the LoginPage block.

LoginPage

PropTypeDefaultDescription
logoReact.ReactNodeBrand mark rendered above the heading.
titleReact.ReactNode"Welcome back"Heading above the form.
descriptionReact.ReactNode"Sign in to your account to continue."Supporting copy under the heading.
emailLabelReact.ReactNode"Email"Email field label.
emailPlaceholderstring"you@example.com"Email field placeholder.
passwordLabelReact.ReactNode"Password"Password field label.
passwordPlaceholderstring"••••••••"Password field placeholder.
submitLabelReact.ReactNodeEmail-step submit copy. Defaults to "Sign in", or "Send code" when `otp` is set.
otpbooleanfalsePasswordless one-time-code mode — hides the password field, then shows an OTP field on the verify step.
otpLengthnumber6Number of OTP slots on the verify step.
onRequestCode(email: string) => void | Promise<void | { error?: string }>Called when the email is submitted in `otp` mode — send the code here. Return `{ error }` to keep the user on the email step (e.g. pre-flight rejection); returning nothing advances to the code-entry step.
onVerifyCode(values: { email: string; code: string }) => voidCalled when the code is submitted (or auto-completes) on the verify step.
forgotHrefstringForgot-password link href. Omit to hide the link.
googleEnabledbooleanfalseShow the "Continue with Google" button and the divider.
googleLabelReact.ReactNode"Continue with Google"Google button copy.
dividerLabelReact.ReactNode"or"Divider text between the social button and the email form.
footerTextReact.ReactNode"Don't have an account?"Footer prompt before the sign-up link.
footerLinkTextReact.ReactNode"Sign up"Footer link label.
footerHrefstring"#"Footer link href.
onSubmit(values: { email: string; password: string }) => voidCalled on form submit with the entered credentials.
onGoogle() => voidCalled when the Google button is pressed.
errorReact.ReactNodeError message rendered in a red banner under the heading. Pass the auth context's `error` here so an unauthorized sign-in is surfaced inline.
classNamestringExtra classes merged onto the Card.