{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "password-input-shadcnui", "type": "registry:component", "title": "Password Input", "description": "Password input with toggle visibility and strength indicator", "registryDependencies": [ "button" ], "dependencies": [ "framer-motion", "react" ], "files": [ { "path": "@uitripled/react-shadcn/src/components/inputs/password-input.tsx", "content": "\"use client\";\n\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { Eye, EyeOff } from \"lucide-react\";\nimport { useState } from \"react\";\n\nexport function PasswordInput() {\n const [showPassword, setShowPassword] = useState(false);\n const [password, setPassword] = useState(\"\");\n\n return (\n
\n \n
\n setPassword(e.target.value)}\n className=\"w-full rounded-lg border bg-[var(--card-bg)] px-4 py-2 pr-12 text-sm focus:outline-none focus:ring-2 focus:ring-accent\"\n placeholder=\"Enter your password\"\n autoComplete=\"off\"\n name=\"password-demo\"\n whileFocus={{ scale: 1.01 }}\n transition={{ duration: 0.2 }}\n />\n setShowPassword(!showPassword)}\n className=\"absolute right-3 top-0 bottom-0 -translate-y-1/2 text-[var(--foreground)]/60 hover:text-[var(--foreground)]\"\n whileHover={{ scale: 1.1 }}\n whileTap={{ scale: 0.95 }}\n >\n \n {showPassword ? (\n \n \n \n ) : (\n \n \n \n )}\n \n \n
\n {password && (\n \n
\n {[0, 1, 2, 3].map((i) => (\n i * 3 ? 1 : 0,\n }}\n className=\"h-1 flex-1 rounded-full bg-accent\"\n style={{ originX: 0 }}\n transition={{ delay: i * 0.1 }}\n />\n ))}\n
\n \n Password strength:{\" \"}\n {password.length < 4\n ? \"Weak\"\n : password.length < 8\n ? \"Medium\"\n : \"Strong\"}\n \n \n )}\n
\n );\n}\n", "type": "registry:component", "target": "components/uitripled/password-input-shadcnui.tsx" } ] }