ViraStackViraStackPassword
GitHubX (Twitter)
  • Getting Started
    • Overview
    • Basic Usage
    • Custom Icons
    • Custom Text
    • Self Closing
    • Shadcn UI
  • API Reference
© 2026 ViraStack
  1. ViraStack
  2. Password Toggle
  3. Examples
  4. Basic
Skip to Content
Search...
    • Introduction
    • Getting Started
      • Overview
      • Credit Card
      • Card Number
      • Expiry
      • CVV
      • IBAN
      • Currency
      • TCKN
      • Tax Number
      • Phone
      • Email
      • Zip Code
      • Date
      • Password
      • URL
      • Username
      • Alpha
      • Numeric
      • Text
      • Custom Mask
    • Schema & Presets
    • Mask Options
    • Custom Masks
    • Currency
    • Built-in Validation
      • Schema Validation
      • UI Libraries
      • Overview
      • Core Functions
      • Currency Helpers
      • Utility Functions
    • Types
    • Projects
    • Ai 
    • Next.js Boilerplate 
    • Mask 
    • Password 
    • Modern Web in 3 Minutes 
    • Introduction
    • Getting Started
      • Overview
      • Basic Usage
      • Self-Closing
      • Custom Icons
      • Custom Text
      • Shadcn UI Integration
      • useViraPassword
    • Projects
    • Ai 
    • Next.js Boilerplate 
    • Mask 
    • Password 
    • Modern Web in 3 Minutes 
    • About
    • Ai Rules
    • CLI
    • Community
    • Dashboard
    • Error Guard
    • Maintainers
    • Modern Web in 3 Minutes
    • Next.js Boilerplate
    • Roadmap
    • Standards
    • Tanstack Boilerplate
Question? Give us feedback 

Basic Usage

This example demonstrates how to use useViraPassword with standard HTML input and button elements.

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

© 2026 ViraStack. MIT License.

Created by Ömer Gülçiçek|GitHub