Components › Blocks
Auth card
Sign in, sign up and a one-time code step in one card. Uncontrolled, it hands you FormData.
Installation
npx plankui@latest add auth-cardUsage
import { AuthCard } from "@/components/ui/auth-card";
<AuthCard providers={[{ id: "sso", name: "SSO", icon: <Building2 /> }]} onSubmit={(data) => signIn(data)} />API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| mode / onModeChange | "sign-in" | "sign-up" | "verify" | "sign-in" | Which screen shows. |
| providers | { id; name; icon }[] | [] | Other ways in, under the form. |
| providerLayout | "stacked" | "inline" | "stacked" | Full-width buttons or a row of icons. |
| onSubmit | (data: FormData, mode) => void | Promise | Runs on submit, then the card moves to verify. | |
| onVerify | (code: string) => void | Promise | Runs when the code is complete. |