Auth card
The login card with Password, Magic link and Social tabs; sending a magic link morphs into an inbox state whose six-box code step pops each digit and sweeps in a success check.
Installation
Installation is available on the Startup and Business plans. Your personal install command appears here once you have access.
Usage
Import it, pass your props, and make it part of your product.
import { AuthCard } from '@/components/component-kit/items/block-auth-card';
export function Example() { return <AuthCard onSubmit={(payload) => console.log(payload)} />;}Props
| Prop | Type | Default | Description |
|---|---|---|---|
defaultTab | "password" | "magic-link" | "social" | "password" | Tab shown on first render. |
demoCode | string | "246810" | The six-digit code the OTP step accepts; any other code shakes and clears. |
onSubmit | (payload: AuthPayload) => void | undefined | Called with { method: 'password' | 'magic-link' | 'otp' | 'social', ... } when a flow completes. |
providers | ("github" | "google" | "apple")[] | ["github", "google", "apple"] | Social providers shown on the Social tab, in order. |
compact | boolean | false | Tighter card with the subtitle, password field and footer removed, for index cards. |
autoPlay | boolean | false | Cycle the tab indicator every 2s once mounted; used by inert previews. |