Skip to content
esc

Login form

Auth4 pieces3 states

Email and password login with 'Remember me', 'Forgot password?' and an optional sign-up link. Validates on blur and submit; a server error shows in a Banner above the fields.

View code

In every theme

Same block, same props. Only the tokens change.

Log in

Welcome back. Enter your details.

Don't have an account?

Ledger

Fintech

Log in

Welcome back. Enter your details.

Don't have an account?

Pulse

Health

Log in

Welcome back. Enter your details.

Don't have an account?

Relay

SaaS

States

default · error · loading

Log in

Welcome back. Enter your details.

Don't have an account?

default

Log in

Welcome back. Enter your details.

Don't have an account?

error

Log in

Welcome back. Enter your details.

Don't have an account?

loading

Sector rules · 8

Returned as sectorRules. Your agent applies the ones for your industry.

Health

3 rules
  1. 01

    After the password, ask for a verification code (VerificationCode block) before showing any health data.

  2. 02

    Log out after 15 minutes without activity and say so on this screen: 'You were logged out to protect your data.'

  3. 03

    Link the privacy notice under the form; patients must be able to read it before logging in.

Fintech

3 rules
  1. 01

    Offer Face ID / fingerprint as the first option on mobile once the device is trusted; the password form is the fallback.

  2. 02

    On a new device, ask for a verification code and send a 'New sign-in' alert to the user.

  3. 03

    Never say whether the email exists; use one error for both fields.

SaaS

2 rules
  1. 01

    Add 'Continue with SSO' for work accounts as a separate block above the form.

  2. 02

    Keep 'Remember me' on by default; sessions last until the user logs out.

Built from the library

Every piece links to its own spec.

PropTypeDescription
onSubmit(values: { email: string; password: string; remember: boolean }) => voidCalled only when both fields are valid.
errorstringServer error, e.g. 'Wrong email or password'; shows the destructive Banner.
loadingbooleanButton shows the spinner and 'Logging in'.
defaultValues{ email?: string; password?: string; remember?: boolean }Starting values, e.g. a remembered email; remember defaults to true.
title / descriptionstringHeading and intro line.
onForgotPassword / onSignUp() => voidSecondary links; the sign-up line only renders with onSignUp.
$npx shadcn add https://unbuiltui.com/r/login-form.json