Skip to content

    Browse components

    Login Form

    A polished sign-in card with social buttons, password reveal, remember me, animated inline validation, a shake on error and a loading-to-success flow.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/login-form

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/login-form.json

    Usage

    import { LoginForm } from "@/components/ui/login-form";
    
    <LoginForm
      onSubmit={async ({ email, password, remember }) => {
        const res = await signIn(email, password, remember);
        if (!res.ok) throw new Error("Incorrect email or password.");
      }}
      footer={<>No account? <a href="/signup">Sign up</a></>}
    />

    Props

    PropTypeDefaultDescription
    titlestring"Welcome back"Card heading.
    descriptionstring"Sign in to continue to your workspace."Text under the heading.
    submitLabelstring"Sign in"Submit button label.
    showSocialbooleantrueShow the GitHub / Google buttons.
    showRememberbooleantrueShow the Remember me checkbox.
    minPasswordLengthnumber8Minimum password length for validation.
    onSubmitReactNode—`(values) => void | Promise<void>`. Throw an Error to show its message as a form error.
    onSocialReactNode—`(provider: "github" | "google") => void | Promise<void>`.
    footerReactNode—Content under the form, e.g. a sign-up link.
    classNamestring—Extra classes for the root element.