All Projects â†’ zakangelle â†’ React Password Mask

zakangelle / React Password Mask

Show/hide the contents of a password field.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Password Mask

Routing
The Routing component maps an HTTP request to a set of configuration variables.
Stars: ✭ 7,080 (+20723.53%)
Mutual labels:  component
Vue Lazy Component
🐌 Vue.js 2.x 组件级懒加载方案-Vue.js 2.x component level lazy loading solution
Stars: ✭ 915 (+2591.18%)
Mutual labels:  component
Jcnavigator
A decoupled navigator framework of jumping between modules or apps for iOS development.
Stars: ✭ 33 (-2.94%)
Mutual labels:  component
React Toggle Switch Demo
Source code for a simple demo app showing how to build a custom toggle switch for React applications.
Stars: ✭ 15 (-55.88%)
Mutual labels:  component
React Pricing Table
💶 Fast, flexible, simple pricing tables in React.
Stars: ✭ 21 (-38.24%)
Mutual labels:  component
Telegram Notifier
Provides Telegram integration for Symfony Notifier.
Stars: ✭ 30 (-11.76%)
Mutual labels:  component
Polyfill Xml
This polyfill is deprecated. Use the symfony/polyfill-php72 package instead.
Stars: ✭ 11 (-67.65%)
Mutual labels:  component
React Calendar
A React Native inspired date list renderer
Stars: ✭ 34 (+0%)
Mutual labels:  component
Respin
React SVG loading spinner based on jxnblk.com/loading
Stars: ✭ 21 (-38.24%)
Mutual labels:  component
React Iron Image
Image lazy loading React component inspired by Polymer's iron-image component.
Stars: ✭ 32 (-5.88%)
Mutual labels:  component
Ks Unlimited Marquee
🐞 A unidirectional scrollable React component.
Stars: ✭ 15 (-55.88%)
Mutual labels:  component
Dotnet Assembly Grapher
Reverse engineering and software quality assurance tool for .NET assemblies
Stars: ✭ 21 (-38.24%)
Mutual labels:  component
React Native Aws Iot Device Shadows
React Native Component for connecting to AWS IoT Shadows from a device using SDK JavaScript bundle
Stars: ✭ 30 (-11.76%)
Mutual labels:  component
React Accordion With Header
React accordion component with flexbox header
Stars: ✭ 14 (-58.82%)
Mutual labels:  component
React Base Table
A react table component to display large datasets with high performance and flexibility
Stars: ✭ 966 (+2741.18%)
Mutual labels:  component
Egjs
Javascript components group that brings easiest and fastest way to build a web application in your way.
Stars: ✭ 871 (+2461.76%)
Mutual labels:  component
React Awesome Button
React button component. Awesome button is a 3D UI, progress, social and share enabled, animated at 60fps, light weight, performant, production ready react UI button component. 🖥️ 📱
Stars: ✭ 943 (+2673.53%)
Mutual labels:  component
Wonders
🌈 Declarative JavaScript framework to build command-line applications.
Stars: ✭ 34 (+0%)
Mutual labels:  component
Vue Share Buttons
🔗A set of social buttons for Vue.js
Stars: ✭ 34 (+0%)
Mutual labels:  component
React Image Lightbox
React lightbox component
Stars: ✭ 956 (+2711.76%)
Mutual labels:  component

React Password Mask

Show/hide the contents of a password field.

Circle CI Coverage Status See Demo

Installation

$ npm install react-password-mask

Usage

import PasswordMask from 'react-password-mask';
<PasswordMask
  id="password"
  name="password"
  placeholder="Enter password"
  value={this.state.password}
  onChange={this.handleChange.bind(this)}
/>

Unstyled Example

Use useVendorStyles={false} to disable the default CSS styles from the package. You can then style the component from scratch using inputStyles/buttonStyles or inputClassName/buttonClassName.

<PasswordMask
  id="password"
  name="password"
  value={this.state.password}
  onChange={this.handleChange.bind(this)}
  useVendorStyles={false}
/>

Options

Option Type Description
value any The value of the password field.
id string The HTML id attribute used for the password field.
name string The HTML name attribute used for the password field.
className string A space-separated list of HTML class attributes applied to the container.
inputClassName string A space-separated list of HTML class attributes, applied to the password field.
buttonClassName string A space-separated list of HTML class attributes, applied to the show/hide button.
placeholder string The HTML placeholder attribute used for the password field.
autoFocus boolean The HTML autofocus attribute used for the password field.
maxLength number The HTML maxlength attribute used for the password field.
onChange function A callback function to be invoked when the value of the field changes. Receives an argument containing the React SyntheticEvent object.
onKeyDown function A callback function to be invoked when a key is pressed inside the input field. Receives an argument containing the React SyntheticEvent object.
onShow function A callback function to be invoked when the value of the field is shown. Receives an argument containing the current value of the field.
onHide function A callback function to be invoked when the value of the field is masked. Receives an argument containing the current value of the field.
onToggle function A callback function to be invoked when the value of the field is shown or masked. Receives an argument containing the current value of the field.
inputStyles object Inline CSS styles to be applied to the password field.
buttonStyles object Inline CSS styles to be applied to the show/hide button.
useVendorStyles boolean Whether the vendor styles of this package should be applied at all. Default: true
showButtonContent element, string The HTML content of the show button.
hideButtonContent element, string The HTML content of the hide button.

Development

Install dependencies:

$ npm install

Run the example app at http://localhost:8080:

$ npm run example

Run tests using jest:

$ npm test

Update test snapshots:

$ npm run test:update

Run tests and watch for code changes:

$ npm run test:watch

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].