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-centeredInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/login-centeredManually
Install the dependencies
npm install lucide-react motionCopy these files into your project
- components/silicon-ui/blocks/login-centered/login-centered.tsx
- components/silicon-ui/blocks/login-centered/login-centered.module.css
Shared with other components. Skip any you already have.
- components/silicon-ui/otp-input/otp-input.tsx
- components/silicon-ui/otp-input/otp-input.module.css
- components/silicon-ui/input/input.tsx
- components/silicon-ui/input/input.module.css
- components/silicon-ui/button/button.tsx
- components/silicon-ui/button/button.module.css
Add the foundation, once per app, for the design and motion tokens
npx shadcn@latest add @silicon-ui/silicon-foundation
Usage
API reference
| Prop | Type | Default |
|---|---|---|
demoCodeThe code the simulated email contains. | string | "482913" |
fullScreenFill the viewport (100dvh, no frame) when the block is the whole page. | boolean | false |
demoEmailThe account a simulated passkey or single sign-on resolves to. | string | "maya@northwind.studio" |
termsHref | string | "#terms" |
privacyHref | string | "#privacy" |
onSignInCalled once the simulated sign in or sign up succeeds. | (email: string, method: LoginMethod, mode: Mode) => void | — |
className | string | — |