change autocomplete textbox background color.
See original GitHub issueHi @l-urence I have used autocomplete input and my code looks like this
<Autocomplete
autoCapitalize="none"
autoCorrect={false}
containerStyle={{zIndex:5}}
inputContainerStyle={{borderColor:'transparent',height: 50,backgroundColor:'red'}}
data={countryList.length === 1 && comp(this.state.countryQuery, countryList[0].name) ? [] : countryList}
defaultValue={this.state.countryQuery}
onChangeText={text => this.setState({countryQuery: text })}
placeholder="Search for your country."
renderItem={data => (
<TouchableOpacity onPress={() => this.onCountrySelection(data)}>
<Text style={styles.itemText}>
{data.name}
</Text>
</TouchableOpacity>
)}
/>
I need is to change the background color to transparent so that it will look good with my design.
i tried using background color in both containerStyle and inputContainerStyle but nothing works…
if use style={{backgroundColor:'#ececec '}} then it works for android not in iOS…
any workaround idea to get this done.
Thanks in advance.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Removing input background colour for Chrome autocomplete?
On a form I'm working on, Chrome is auto-filling the email and password fields. This is fine, however, Chrome changes the background colour...
Read more >Change Autocomplete Styles in WebKit Browsers - CSS-Tricks
The default styling only affects the background color, but most other properties apply here, such as border and font-size .
Read more >A trick to change the autocomplete background-color
A trick to change the autocomplete background-color. #design #css #webkit. Story. When I worked on a project as ...
Read more >autofill - CSS: Cascading Style Sheets - MDN Web Docs
This means that you cannot set the background-color , background-image , or color in your own rules. Syntax. :autofill. Examples. The following ...
Read more >Removing input background color for Chrome autocomplete
Removing input background color for Chrome autocomplete · GitHub. Instantly share code, notes, and snippets.
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

If you want to get rid of the border set it’s width to zero:
inputContainerStyle={{ borderWidth: 0 }}.Try to use
backgroundColor: 'rgba(52, 52, 52, 0)'instead ofborderColor: 'transparent'.