How to change the Cursor Color of TextInput Component in React Native

Last Updated on October 15, 2019.

A react native project without using TextInput component can be a strange thing. In this blog post, I will show you how to change the color of TextInput cursor. Yes, it’s a simple thing but it can have significance when you are designing your react native app.

Text input has many props which provide configurability for several features. You should use Text input prop selectionColor to change the default color of the cursor into color of your wish. As written in the official document, selectionColor is the highlight and cursor color of the text input.

For example, you can change the color of TextInput component as given below:

<TextInput
  selectionColor='red'
/>

I hope this blog post helped you, even though it is a short one. Have any doubts? Let me know using the comment section given below.

Leave a Reply

%d bloggers like this: