tvOS: TextInput backgroundColor style prop has inconsistent UI when highlighted.
See original GitHub issue
React Native version: react-native-tvos@0.60.4-6
Code
<TextInput style={styles.textInput} placeholder="Email Address" />
const styles = StyleSheet.create({
textInput: {
backgroundColor: '#D5D5D5',
height: 72,
textAlign: 'center',
fontSize: 32,
fontWeight: '300',
marginBottom: 28,
},
})
Describe what you expected to happen:
TextInput has default tvOS UI experience that I need to customize. Providing styling to TextInput should disable that default tvOS UI experience.
Snack, code example, screenshot, or link to a repository:
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (1 by maintainers)
Top Results From Across the Web
tvOS: TextInput backgroundColor style prop has inconsistent ...
The technique below seems to solve that issue, and wrapping the TextInput in a Touchable seems to restore the styling that you would...
Read more >React Native TextInput background color looks double layered ...
ios - React Native TextInput background color looks double layered when it's set to color with transparence - Stack Overflow. Stack Overflow ...
Read more >Safari Technology Preview Release Notes - Apple Developer
Added emulation toggles for prefers-reduced-motion and prefers-contrast CSS media features (257197@main); Fixed corrupted styles when adding a new property ...
Read more >Fullstack react native sample code - Weebly
During runtime React Native takes care of rendering the actual native UI for each ... We only have a single prop attached, style,...
Read more >TextInput - React Native
TextInput has by default a border at the bottom of its view. This border has its padding set by the background image provided...
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 Free
Top 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

This workaround seems to partially work, but when the
TouchableOpacityuses a light background like “white” and the Text uses a “black” color, then the text is not visible as can be seen in this screenshot:Black background - White text
White background - Black text
This seems to be a long-standing issue with RN, where styles supported in
<Text/>are not necessarily supported in<TextInput/>. https://github.com/facebook/react-native/issues/7070