Ad
How To Make A Custom Text Input For Password In React Native?
How can I go about making a TextInput of password type like this in React Native? I want the input to turn into a black circle only like the default type, but I want it to customize according to my padding between each input.
Ad
Answer
You can use the modules you have without making them.
You can use react-native-pin-view
The way I'm using it
import PinView from "react-native-pin-view";
...
<PinView
onComplete={this.onFinishCheckingCode.bind(this)}
pinLength={4}
inputBgColor="#888888"
inputActiveBgColor="#ffd90d"
buttonBgColor="#ffffff"
buttonTextColor="black"
keyboardViewStyle={{
borderColor: "#dfdfdf",
borderWidth: 1,
width: windowHeight / 11,
height: windowHeight / 11
}}
inputViewStyle={{ width: 18, height: 18, marginRight: 20 }}
/>
Ad
source: stackoverflow.com
Related Questions
- → Import statement and Babel
- → should I choose reactjs+f7 or f7+vue.js?
- → Uncaught TypeError: Cannot read property '__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined
- → .tsx webpack compile fails: Unexpected token <
- → React-router: Passing props to children
- → ListView.DataSource looping data for React Native
- → React Native with visual studio 2015 IDE
- → Can't test submit handler in React component
- → React + Flux - How to avoid global variable
- → Webpack, React & Babel, not rendering DOM
- → How do I determine if a new ReactJS session and/or Browser session has started?
- → Alt @decorators in React-Native
- → How to dynamically add class to parent div of focused input field?
Ad