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.

Web: Unwanted TextInput focus outline

See original GitHub issue

Ask your Question

I thought this would remove the focus outline style with react-native-web, but it doesn’t 😞.

const styles = StyleSheet.create({
  textInput: {
    outlineStyle: "none",
    outlineWidth: 0,
    outlineColor: "transparent"
  }
});

<TextInput style={styles.textInput} />

How can I remove it?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

19reactions
timsonatercommented, May 27, 2020

This worked for me, no libs

<TextInput
   style={{outline: "none"}}
/>
1reaction
sanghee-devcommented, Mar 9, 2021

This worked for me!

import { Platform } from "react-native";

const TextInput = styled.TextInput`
  ${Platform.select({
    web: css`
      outline-style: none;
    `,
  })};
`;
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to remove the border highlight on an input text element
input :focus, select:focus, textarea:focus, button:focus { outline: none; } ... "focus" when navigating a web document using the TAB key (or equivalent).
Read more >
How to Remove and Style the Border Around Text Input Boxes ...
Use outline: none to remove the ugly border color for a form field in Chrome. Learn also how to give your own style...
Read more >
How to Remove Outline around Text Input ... - Tutorial Republic
In Google Chrome browser form controls like <input> , <textarea> and <select> highlighted with blue outline around them on focus.
Read more >
focus - CSS: Cascading Style Sheets - MDN Web Docs - Mozilla
The :focus CSS pseudo-class represents an element (such as a form input) that has received focus. It is generally triggered when the user ......
Read more >
outline - CSS-Tricks
to the css input area it only removes the focus border from the desktop site but leaves the focus border on tablet and...
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