Can't remove black border around input with style options
See original GitHub issue<View
style={styles.serviceSelect}
animation="bounceInUp">
<SearchBar
noIcon
selectionColor="orange"
autoCorrect={false}
style={{margin: 0, padding: 0}}
placeholderTextColor="orange"
placeholder="TAP TO FIND SERVICE"
containerStyle={{
borderRadius: 3,
borderWidth: 0,
padding: 0,
margin: 0
}}
inputStyle={{
borderWidth: 0,
paddingTop: 0,
paddingBottom: 0,
backgroundColor: '#333',
fontFamily: 'matrix',
color: 'orange',
fontSize: 28,
textAlign: 'center',
paddingLeft: 16,
paddingRight: 16,
margin: 0,
height: 30
}}
/>
</View>
const styles = StyleSheet.create({
serviceSelect: {
backgroundColor: '#333',
left: '7.5%',
width: '85%',
position: 'absolute',
top: 80,
zIndex: 11,
shadowRadius: 2.5,
shadowOpacity: .3,
paddingTop: 10, paddingBottom: 10,
borderRadius: 3,
shadowOffset: {width: 0, height: 4},
borderWidth: 0
}
});
I am trying to remove the black border surrounding the input. I have set borderWidth
to 0
in both the containerStyle
and inputStyle
yet it is still showing.
Does anyone know how I can fix this?
My package.json:
{
"name": "MyApp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.2.0",
"react-native": "0.52.0",
"react-native-animatable": "^1.2.4",
"react-native-elements": "^0.19.0",
"react-native-foldview": "^1.1.1",
"react-native-maps": "^0.19.0",
"react-native-permissions": "^1.0.6",
"react-native-vector-icons": "^4.5.0",
"react-navigation": "^1.0.0-beta.27"
},
"devDependencies": {
"babel-jest": "22.1.0",
"babel-preset-react-native": "4.0.0",
"jest": "22.1.4",
"react-test-renderer": "16.2.0"
},
"jest": {
"preset": "react-native"
},
"rnpm": {
"assets": [
"./assets/fonts/"
]
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
How to remove the border highlight on an input text element
In Bootstrap 4 to remove border outline you can use shadow-none , it will remove focus outline.
Read more >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 ...
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 >border-bottom - CSS: Cascading Style Sheets - MDN Web Docs
The border-bottom shorthand CSS property sets an element's bottom border. It sets the values of border-bottom-width, border-bottom-style and ...
Read more >Apply or remove cell borders on a worksheet - Microsoft Support
Click Format. On the Border tab, under Line, in the Style box, click the line style that you want to use for the...
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
@iRoachie Life saver, thanks so much.
Apparently
borderWidth
can’t overrideborderTopWidth
andborderBottomWidth
defined here. https://github.com/react-native-training/react-native-elements/blob/v0.19.0/src/input/Search.js#L165-L166Instead change your
containerStyle
to: