Skip to Content

Getting Started

Installation

Install the package using your preferred package manager:

pnpm
$ pnpm add @virastack/password-toggle

Basic Usage

Import the useViraPassword hook and use the returned props to connect your input and button.

import { useViraPassword } from '@virastack/password-toggle'; function PasswordInput() { const { inputProps, btnProps } = useViraPassword(); return ( <div> <input {...inputProps} /> <button {...btnProps}> {btnProps.children} </button> </div> ); }

© 2026 ViraStack. MIT License.