ViraStack Password
Fully accessible and customizable password visibility hook for React.
Installation
pnpm
$ pnpm add @virastack/password-toggleQuick Start
import { useViraPassword } from '@virastack/password-toggle';
function PasswordInput() {
const { inputProps, btnProps } = useViraPassword();
return (
<div>
<input {...inputProps} />
<button {...btnProps}>
{btnProps.children}
</button>
</div>
);
}Features
- 🔒 Secure: Handles password visibility toggle securely.
- ♿ Accessible: Full ARIA support for screen readers.
- 🎨 Customizable: Use custom icons or text for the toggle button.
- 📦 Lightweight: Zero dependencies (except React).
- 🧩 Easy Integration: Works seamlessly with any UI library (shadcn/ui, MUI, etc.).
