登录卡片

New

中文产品登录弹窗:蓝色渐变头部带漂浮光斑,微信扫码列与手机号快捷登录并排(区号下拉、验证码 60 秒重发倒计时),未勾选协议提交时协议行抖动提示,并带 ICP 备案页脚。

登录后有问题,免费聊

微信扫码登录
手机号快捷登录
© 2026 你的公司名称ICP 备案号 000000公安备案号 000000

安装

用 shadcn CLI 添加,或手动复制源码。

$ bunx --bun shadcn add @uilab/login-card

API 参考

className?
string
titleLines?
string[]

头部两行标题,默认 ["登录后", "有问题,免费聊"]

["登录后", "有问题,免费聊"]
countryCode?
string

区号,默认 "+86"

+86
countryOptions?
string[]

区号可选项,默认 ["+86","+852","+886","+1","+44","+81"]

["+86", "+852", "+886", "+1", "+44", "+81"]
qr?
ReactNode

覆盖二维码槽位;不传则渲染内置占位二维码

qrSeed?
number

内置占位二维码的种子,默认 20260719

20260719
footer?
ReactNode

卡片下方的备案小字;传 null 隐藏;不传用默认 ICP 文案

onSubmit?
((data: { phone: string; code: string; countryCode: string; }) => void | Promise<void>)

点「登录」回调,可 async;期间按钮显示加载态

onSendCode?
((phone: string) => void | Promise<void>)

点「发送」回调,可 async

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.