Centered login

A passkey-first login card on a quiet ring backdrop that morphs through email and code.

npx shadcn@latest add @silicon-ui/login-centered
Loading…

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/login-centered

Manually

  1. Install the dependencies.

    npm install lucide-react motion
  2. Copy these files into your project. Shared files are skipped if you already have them.

    • components/silicon-ui/blocks/login-centered/login-centered.tsx
    • components/silicon-ui/blocks/login-centered/login-centered.module.css
    • components/silicon-ui/otp-input/otp-input.tsx shared
    • components/silicon-ui/otp-input/otp-input.module.css shared
    • components/silicon-ui/input/input.tsx shared
    • components/silicon-ui/input/input.module.css shared
    • components/silicon-ui/button/button.tsx shared
    • components/silicon-ui/button/button.module.css shared
  3. Install the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

Source codetsx
import { LoginCentered } from "@/components/silicon-ui/blocks/login-centered/login-centered";

API reference

PropTypeDefault
demoCode

The code the simulated email contains.

string"482913"
fullScreen

Fill the viewport (100dvh, no frame) when the block is the whole page.

booleanfalse
demoEmail

The account a simulated passkey or single sign-on resolves to.

string"maya@northwind.studio"
termsHrefstring"#terms"
privacyHrefstring"#privacy"
onSignIn

Called once the simulated sign in or sign up succeeds.

(email: string, method: LoginMethod, mode: Mode) => void—
classNamestring—

Dependencies

npm
lucide-reactmotion
Registry
silicon-motion-tokensbuttoninputotp-input