Another simple way is to completely remove the underline/outline effect by setting the mode to “flat” and the underlineColor to “transparent.”
import * as React from 'react';
import { View, StyleSheet } from 'react-native';
import { TextInput, Provider as PaperProvider } from 'react-native-paper';
export default function App() {
const [text, setText] = React.useState('');
return (
<PaperProvider>
<View style={styles.container}>
<TextInput
mode="flat"
placeholder="Phone Number"
underlineColor="transparent"
value={text}
onChangeText={setText}
keyboardType="phone-pad"
style={styles.input}
/>
</View>
</PaperProvider>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
padding: 20,
backgroundColor: '#f2f2f2',
},
input: {
backgroundColor: '#fff',
borderRadius: 20,
},
});
Work with our skilled React Native developers to accelerate your project and boost its performance.
Hire React Native Developers