Trying to set keyboardType on a TextInput with the dark keyboard theme, how do you do this in React Native?
Implement Dark Mode Using React NavigationThe `NavigationContainer` of React Navigation allows you to pass the `theme` prop. You can change the theme prop dynamically and all the components will automatically update to reflect the new theme.
you can use redux to handle this. take 2 set of constant files where you will have all colors and import those two in each class where ever required and while setting color check using props. Ex: <Text style={{color: this. props.
you can set keyboardAppearance
in Textinput for change theme 'default', 'light', 'dark'
<TextInput
keyboardAppearance='dark'
/>
It is now supported for iOS.
As documented here: https://facebook.github.io/react-native/docs/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