npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

try-react-password-input

v1.0.0

Published

A password input with certain validations provided by the developer via props

Downloads

4

Readme

try-react-password-input

npm version

A password input component which accepts certain qualifications for password to valid as props and then returns whether password is valid or in the callback

For validations we have used password-validator module

Installation

npm install try-react-password-input

How to use it ?

import Password from 'try-react-password-input';

handleChange(passwordValid, password) {
  console.log(passwordValid, password);
}

<Password
  uppercase
  lowercase
  digits
  onChange={this.handleChange}
  className="password-input"
/>

Password Validations available pas props

| Validation | type | Description | | :--- | :---: | :--- | | uppercase | Boolean | specifies whether password should contain uppercase characters | | lowercase | Boolean |specifies whether password should contain lowercase characters | | digits | Boolean | specifies that password should contain digits | | noSpaces | Boolean |specifies that password should not contain any spaces | | max | Number | specifies the maximum number characters in password no max chars in password, unless specified | | min | Number | specifies the minimum number characters in password no min chars in password, unless specified | | symbols | Boolean | specifies whether or not password should contain symbols |

Note: All the above props/validation if Boolean has default value as false, and others are undefined.

Other Props

| Prop | Type | Default | Description | | :--- | :--- | :--- | :--- | | value | String | empty string |value of password text | | onChange | Function | empty funtion | method called everytime value is changed in password input field, has passwordValidity and password value in arguments (if list is true, receives array of keys as list invalidities which are spelled same as props) | | list | Boolean | True | specifies whether validation api should return list of failed validations or not | | showValidity | Boolean | True | specifies if the validity indicator needs to be shown to indicate password is valid or not (list showing all the validities if list is true else and small indicator showing password valid or not) | | showPassword | Boolean | False | specifies whether show password button needs to be shown or not | | className | String | empty string | adds class to the root element | | inputClass | String | empty string | adds class to the input element |

Note : All the other default props such as id, etc. are accpted by default if they are not one of the props listed above such as onChange.