i am doing mobile applications in react-native for android and ios. In my project i am using TextInput Component(ios). This component appear without underline. How to use TextInput with underline color in ios.
code sample -
<TextInput
ref={'cardbatch1'}
keyboardType = 'numeric'
placeholder = 'Batch Number'
autoCapitalize = 'none'
/>
Try this in styles.. see the difference in output
const styles = StyleSheet.create({
inputBox: {
.....
borderBottomWidth: 1,
borderBottomColor: 'gray',
....
}
});
Finally add the style in textInput
<TextInput
...
keyboardType = 'numeric'
placeholder = 'Batch Number'
autoCapitalize = 'none'
style={styles.inputBox}
.....
/>
You could add borderBottomWidth and borderBottomColor to TextInput or simply draw a view with 1 or 2 px height below TextInput.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With