ViraStack
  • About
  • Support
HomeGet StartedExamples

Getting started

  • Introduction
  • llms.txt
  • llms-full.txt

Usage

  • useViraPassword()
  • Accessibility
  • Customization
  • Helpers
  • Types
  • UI libraries

Types

TypeScript types exported from the package.

UseViraPasswordOptions

interface UseViraPasswordOptions {
  defaultVisible?: boolean
  icons?: {
    show: ReactNode
    hide: ReactNode
  }
  disabled?: boolean
  readOnly?: boolean
  id?: string
  inputProps?: React.InputHTMLAttributes<HTMLInputElement>
  btnProps?: React.ButtonHTMLAttributes<HTMLButtonElement>
}

UseViraPasswordResult

interface UseViraPasswordResult {
  inputProps: React.InputHTMLAttributes<HTMLInputElement>
  btnProps: React.ButtonHTMLAttributes<HTMLButtonElement>
  isVisible: boolean
  toggle: () => void
  setVisible: (visible: boolean) => void
}

Also exported:

  • useViraPassword, mergeProps
  • getInputType, getButtonAriaAttributes, getInputAriaAttributes
  • EyeIcon, EyeOffIcon
PreviousHelpersNextUI libraries

On this page

  • UseViraPasswordOptions
  • UseViraPasswordResult
Something wrong? Fix it