Auth Forms
Sign in, sign up, forgot password and verify-code forms in one card.
- Category
- Auth
- Access
- Free with an account
- Source
- 368 lines · one file
The decision inside it
Provider logos are yours
The forms take provider buttons with your own marks. No brand logo is drawn into the component.
When to use it
Use Auth Forms for sign-in screens: LoginForm, SignupForm, ForgotPasswordForm and VerifyCodeForm, each inside an AuthCard, with async submits that show errors inline and provider buttons whose icons you supply.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Liro's Auth Forms for this.
Install it: npx shadcn@latest add @liro/auth
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/auth.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Free components install through the @liro registry with your CLI token: see the Namespaced tab.
Usage
"use client";
import { AuthCard, LoginForm } from "@/components/ui/auth";
export default function LoginPage() {
return (
<AuthCard title="Sign in to Madgixs" description="Use your work email.">
<LoginForm
onSubmit={async ({ email, password }) => {
const res = await fetch("/api/login", { method: "POST", body: JSON.stringify({ email, password }) });
if (!res.ok) throw new Error("That email and password don't match.");
}}
providers={[{ id: "google", label: "Continue with Google" }]}
forgotHref="/forgot"
signupHref="/signup"
/>
</AuthCard>
);
}API reference
“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Type | Notes | ||
|---|---|---|---|
onSubmit | (v: { email: string; password: string; remember: boolean }) => void | Promise<void> | Yes | – |
providers | AuthProvider[] | No | – |
onProvider | (id: string) => void | No | – |
forgotHref | string | No | – |
signupHref | string | No | – |
passwordless | boolean | No | Email-only magic link: hides the password field. |
defaultEmail | string | No | – |
Dependencies
npm packages
clsxlucide-reacttailwind-mergeLiro foundations, installed alongside it
liro-themebuttoncheckboxfieldinputotp-inputpassword-strengthAccessibility
- Keyboard reachable throughout, in visual order
- Focus trapped in overlays, Escape closes them
- Focus returns to whatever opened it
- Live regions announce what changed, not that something did
- Honours prefers-reduced-motion
Responsive behavior
- Sizes to its container, not the viewport
- Usable from 320px up
- Pointer-based interaction, so trackpad and touch both work
- No hover-only affordances