Skip to content

virastack/password

Repository files navigation

Vira Stack Password


ViraStack Password Toggle

Fully accessible and customizable password visibility hook for React.

  • Accessibility First: Fully ARIA compliant out of the box for better screen reader support.
  • 🧩 Framework Agnostic: Logic is separated from React state, making it adaptable and clean.
  • 🎨 Smart Defaults: Includes minimal SVG icons by default, so you can start using it immediately.
  • 🔄 Prop Merging: Safely merges user props with hook-generated props to prevent overrides.
  • 🔒 State Sync: Automatically handles disabled and readOnly states for a consistent UX.

Quick Start

npm install @virastack/password
import { useViraPassword } from '@virastack/password';

function App() {
  const { inputProps, btnProps } = useViraPassword();

  return (
    <div>
      <input {...inputProps} placeholder="Enter password" />
      <button {...btnProps} />
    </div>
  );
}

Explore the ViraStack Ecosystem

Discover all ViraStack tools, libraries, and boilerplates at virastack.com.

License

Licensed under the MIT License.

Maintainer

A project by Ömer Gülçiçek

Follow Ömer Gülçiçek

About

Fully accessible and highly customizable password visibility hook for React.

Topics

Resources

License

Stars

14 stars

Watchers

0 watching

Forks

Contributors