Black Friday: 30% off Pro

Get 30% off

Updated

Auth Forms

Pro

Preview

Customize

Sign in

Installation

Pro

Auth Forms is a Pro component

Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.

Buying? Use the email you'll sign in with. Your license is tied to it.

Install with a key

  1. Add the Pro registry to components.json:
    components.json
    {
      "registries": {
        "@uibrik-pro": {
          "url": "https://uibrik.com/r/pro/{name}.json",
          "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" }
        }
      }
    }
  2. Put your key in .env.local and add that file to .gitignore:
    .env.local
    UIBRIK_LICENSE=your-license-key
  3. Install it:
    Terminal
    npx shadcn@latest add @uibrik-pro/auth-forms

Usage

import { AuthForms } from "@/components/uibrik/auth-forms/auth-forms";​<AuthForms  defaultMode="sign-in"  productName="Acme"  providers={["google", "github"]}  termsHref="#"  privacyHref="#"  onModeChange={(mode) => {}}  onSubmit={(values) => {}}  onProvider={(provider) => {}}  // logo={<…/>}  // mode="sign-in"/>

Where to use Auth Forms

  • Sign-in pages

    Sign in, sign up, verification and reset in one card cover the whole auth flow.

    Pairs with OTP Input

  • Password reset

    Easing between modes keeps users in context.

    Pairs with Password Strength

  • SaaS onboarding

    One card for every auth state keeps the design consistent.

Props

AuthForms
defaultMode
Type "sign-in" | "sign-up" | "verify" | "forgot"
"sign-in"
Starting mode when uncontrolled.
productName
Type string
"Acme"
Used in the headings and as the logo's label.
providers
Type string[]
["google","github"]
OAuth buttons, in order: google, github, apple, microsoft. Empty hides them.
logo
Type ReactNode
–
Brand mark above the heading. Pass an image URL or your own element; defaults to a built-in mark.
mode
Type "sign-in" | "sign-up" | "verify" | "forgot"
–
Controlled mode. Pair with onModeChange.
onModeChange
Type (mode: AuthMode) => void
–
Called when a link switches modes.
onSubmit
Type (values: AuthSubmit) => void | Promise<void>
–
Gets { mode, email, password?, name?, code? }. Throw with a message to show it on the form. Without it, the preview accepts code 123456.
onProvider
Type (provider: "google" | "github" | "apple" | "microsoft") => void
–
Called when an OAuth button is pressed.
termsHref
Type string
"#"
Link for Terms in the footer line.
privacyHref
Type string
"#"
Link for Privacy Policy in the footer line.
className
Type string
–
Classes for the root.