question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TextInput cursor color

See original GitHub issue

Is there any way we can change the cursor colour using any props from the TextInput component from this library? I have seen posts where we can change the colour by specifying colours in android/app/src/main/res/values/styles.xml etc. But this is not ideal for me as I require different colours in different places . react-native version 0.61.5 react-native-paper version 4.9.1 react-native-vector-icons version 8.1.0 Thanks.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ferrannpcommented, Jun 4, 2021

@davepaiva this is a React Native bug. See https://github.com/facebook/react-native/issues/30283. selectionColor will style the selection cursors but not the caret. To style the caret you can do it as you say with styles.xml. It looks to me that this PR https://github.com/facebook/react-native/pull/31007 might solve the issue… You can try using patch-package.

0reactions
github-actions[bot]commented, Aug 5, 2021

Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change React Native cursor color? - Stack Overflow
Go to ios/MyApp/AppDelegate.m and before [self.window makeKeyAndVisible]; add: self.window.tintColor = [UIColor colorWithRed:1.0f green:0.0f blue:0.0f alpha:1];.
Read more >
caret-color - CSS: Cascading Style Sheets - MDN Web Docs
This is sometimes referred to as the text input cursor. The caret appears in elements such as <input> or those with the contenteditable ......
Read more >
How to change the Cursor Color of TextInput Component in ...
In this blog post, I will show you how to change the color of TextInput cursor. Yes, it's a simple thing but it...
Read more >
Change TextField Cursor Color in Flutter - The RIGHT Way ...
To change TextField cursor color in Flutter, simply add the cursorColor property and set the color of your choice. Here is the step...
Read more >
CSS caret-color property - W3Schools
Definition and Usage. The caret-color property specifies the color of the cursor (caret) in inputs, textareas, or any element that is editable.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found