Removing web outline in textinput
See original GitHub issueEnvironment
react-native-paper: 3.0.0
Ask your Question
When using textinput with react-native-web it appears an additional line surrounding the input (I have tested it in chrome). In the flat mode, it is ok, but in the outlined, this line crosses out the label when focusing on the input as shown in the image:
Researching a little bit, I have found a solution that consists in adding to the input style outline: 'none'
. In order not to affect the visualization in Android and IOs this line should be placed inside a Platform selection like:
Platform.select({
web: {
input: {
outline: 'none',
},
}
I have been trying to inject this style into the input but I have not found a way to do it. How can I do it?
Inserting this style line directly in the browser’s element inspector solves the problem:
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
How to Remove Outline around Text Input Boxes in Chrome ...
Answer: Use CSS outline property ... In Google Chrome browser form controls like <input> , <textarea> and <select> highlighted with blue outline around...
Read more >How to Remove and Style the Border Around Text Input Boxes ...
Remove the outline and add a border style using the :focus and :active pseudo-classes with the <input> field. Also, you can remove the...
Read more >How to remove focus border (outline) around text/input boxes ...
This border is used to show that the element is focused (i.e. you can type in the input or press the button with...
Read more >How to remove outline around text input boxes ... - Studytonight
The CSS outline property can be used to remove the outline from the text input boxes. Use focus class with outline:none property to...
Read more >How to remove outline around text input ... - GeeksforGeeks
Generally in the case of Google Chrome Browser, when the input field gets focus then the blue outline occurred on the border of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The easiest way:
In you web project add something like this to your index.css or somewhere where you handle CSS.
It will remove outline from all inputs on web 😃
I ended up doing this: