I am using React Native and I would like to change the cursor color of a text input. I actually got the default blue color.
How can I set a global color either in JavaScript or in AppDelegate ?
There is actually a prop doing this for TextInput : selectionColor
<TextInput selectionColor={'green'} />
Here is the documentation.
Best way to accomplish this, if you want consistence trough the app is putting the bellow code in your root file (index.js)
import { TextInput } from 'react-native' TextInput.defaultProps.selectionColor = 'white' /*class....*/
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