Skip to content

A Simple password toggler (Hide/Show) component for React Native's TextInput field

License

Notifications You must be signed in to change notification settings

misteryomi/RNPasswordToggler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native Password Toggler

A Simple password toggler (Hide/Show) component for React Native's TextInput field

This component allows you Toggle the password fields for your React Native forms.

Installation

Install via NPM

npm install react-native-password-toggler --save

Usage

import RNPasswordToggler from 'react-native-password-toggler';
 
export default class App extends Component {

  state = {
      password: '',
      show: false, //optional
  }
  render() {
    return (
        <RNPasswordToggler 
                onChangeText={(value) => this.setState({password: value})}
                show={this.state.show} 
            />
    )
  }
}

Props

Command Description
show Show or hide text input (Default: false)
inputStyle Custom style for the text input field (Example: {padding: 10})
iconStyle Custom style for the toggle icon (Example: {color: 'red'})

You can use default React Native's TextInput props also.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

GPL

About

A Simple password toggler (Hide/Show) component for React Native's TextInput field

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages