ffritz
ffritz

Reputation: 2261

Change color of single word in react native textinput

Is it possible to change the color of a single word within a textinput in react native?

For example, when mentioning someone in a textinput when commenting:

Hello @user

I would like "@user" to be a different color than "Hello" already in the textinput. I know for <Text>, it can be done with react-native-hyperlink and linkify-it, but this question concerns <TextInput>

Upvotes: 3

Views: 687

Answers (1)

Steven Bell
Steven Bell

Reputation: 1989

Short Answer: No, it is not possible using the <TextInput/> in React Native.

Your best bet would be using an input mask, something like react-native-text-input-mask

Upvotes: 1

Related Questions