0

I have a textinput that changes color if the conditions are met or not (green to brown and vice versa) when it is focused.

I would like the colors to stay the same even when the input is unfocused.

Focused and verifications not ok:

Focused and verifications not ok

Focused and verifications ok:

Focused and verifications ok

Unfocused verifications okay or not:

Unfocused verifications okay or not

My code:

//Change brow to green, green to brown
const [inputColor, setInputColor] = useState("brown");

<TextInput
  //{...}
  theme={{
    colors: {
      primary: inputColor,
      underlineColor: inputColor,
    },
  }}
/>;

I tried to change:

  • underlineColor props.
  • borderColor, backgroundColor, color in styles, but nothing is working so far.
XplosiVe06
  • 568
  • 3
  • 23

2 Answers2

0

try underlineColor Type: string Inactive underline color of the input.

Eric
  • 1,279
  • 1
  • 11
  • 8
0

You can try to change the placeholder color theme={{ colors: { primary: 'blue', placeholder: 'blue', }, }}