Xzero UI
Pro library

Sign in

A sign in card that morphs from email to a six digit code to your account.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui/sign-in
Live · keyboard ready

Variant: Email code

A sign in card that morphs from email to a six digit code to your account.

Use this as the entry to your app. Send and check codes through your auth provider, connect the passkey button to WebAuthn and the single sign-on buttons to OAuth; everything in the preview is simulated.

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui/sign-in

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { SignIn } from "@/components/xzero/blocks/sign-in/sign-in";
import { useRouter } from "next/navigation";

export function SignInPage() {
  const router = useRouter();

  return <SignIn onSignIn={() => router.push("/dashboard")} />;
}

API reference

SignIn

A sign in card that moves from email to a six digit code to a signed in account, with passkey and single sign-on buttons. Sending and checking codes is simulated.

PropTypeDefaultDescription
demoCodestring"123456"The code the simulated email contains.
onSignIn(account: SignInAccount, method: SignInMethod) => void–Called once sign in succeeds. SignInAccount is { name, email, photo? }; SignInMethod is "Email code", "Passkey", "Google", "Apple", or "GitHub".

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Related

Browse all components