react native text input number only
keyboardType='numeric'
react native numbers only input
/\*\*
\* Sample React Native App
\* https://github.com/facebook/react-native
\* @flow
\*/
import React, { Component } from "react";
import { Platform, StyleSheet, View, Button, TextInput, } from "react-native";
export default class App extends Component {
render() {
return (
<View style={styles.container}>
<TextInput
placeholder="Enter Your Mobile Number"
underlineColorAndroid='transparent'
style={styles.TextInputStyle}
**keyboardType={'numeric'}**
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
},
headerText: {
fontSize: 20,
textAlign: "center",
margin: 10,
fontWeight: "bold"
},
TextInputStyle: {
textAlign: 'center',
height: 40,
borderRadius: 10,
borderWidth: 2,
borderColor: '#009688',
marginBottom: 10
}
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us