How to change disabled <TextInput/> color

Viewed 3007

React native changing text color when passing props editable=false. screenshot of text input

How i can change that color of text input ?, i have read the documentation https://reactnative.dev/docs/textinput but not getting helped

1 Answers

If you are changing the text input color you can update the style based on the prop:

<TextInput style={{ color: editable ? 'red' : 'blue' }} ... />

If you are trying to change the place holder color, you can do it in a similar manner but with the placeHolderTextColor prop instead:

<TextInput placeHolderTextColor={ editable ? 'red' : 'blue' } ... />
Related