New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-mobile-style-password-input

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-mobile-style-password-input

Mobile like password field for React.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React mobile style password field

Password field with fading letters during input.

password field example

Installation

$ npm install react-mobile-style-password-input

Usage

import InputPassword from 'react-mobile-style-password-input';
<InputPassword
    onPasswordChange={handlePasswordChange}
    name='password'
    type='password'
    placeholder='Input password'
/>

You can use all native input element props in standard way, exclude change field methods. Use onPasswordChange to get value.

Style component

You can style the component with usual way, wia className or style props.

Options

You can use all native input element props in standard way, but be aware of some changes below. All props are not required.

OptionTypeDefault valueDescription
onChangefunctionA callback function to be invoked when the value of the field changes. Receives an argument containing the React SyntheticEvent object, but has an patterned string (not real password value). Use onPasswordChange instead
onPasswordChangefunctionA callback function to be invoked when the value of the field changes. Receives an value of password input (string).
patternstring'•'The letter which will be used for hiding password letters.
nameSuffixstring'__masked'Needs for generate masked (visible) password field name (value will be like name + nameSuffix)
inputRefReact.RefObjectnew React.RefObjectRef for masked (visible) password input.
typestring'password'Native type of HTMLInputElement for real (hidden) password input. Most case is use 'password' and 'text'.
namestring'password'Native name of HTMLInputElement for real (hidden) password input. Used for generate masked (visible) input name.
autoCompletebooleanundefinedNative autoComplete of HTMLInputElement for both real (hidden) and masked (visible) password inputs.
letterFadeDurationnumber600Delay before hiding inputted letter (ms).

Development and Demo

Install dependencies:

Fork the repo and then execute commands in the project folder:

$ npm install
$ npm run dev

Run the example page in your browser: /example/public/index.html

License

MIT

Keywords

FAQs

Package last updated on 28 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc