跳到正文
Linasan UI

PasswordInput 密码输入

可显示 / 隐藏的密码框,附带强度条和泄露提示。

密码强度:— · 至少 8 位,建议包含大小写字母、数字和符号

PasswordBreachHint 停止输入 400ms 后查询 Have I Been Pwned:只发送 SHA-1 的前 5 位(k-匿名),密码本身不离开浏览器;查不到或出错时不显示。

安装

pnpm dlx shadcn@latest add https://docs.linasan.cn/r/password-input.json

第一次装本站的组件前先在项目里执行一次 shadcn init,详见 安装。

用法

import { PasswordBreachHint, PasswordInput, PasswordStrength } from '@/components/auth/password-input';

本页目录