i’m trying to create a text input without border. i gave still and properties then this happened.
There is a bottom border line with black color. how can i remove this border?
import { TextInput } from 'react-native-paper'
those are style codes
width: width * 0.6,
height: height * 0.075,
paddingLeft: 15,
fontSize: 12,
borderRadius: 25,
and text input
<TextInput
style={styles.emptyPostPageTitleInput}
placeholder="title"
placeholderTextColor="grey"
maxLength={17}/>
3
Answers
The documentation states "TextInput has by default a border at the bottom of its view. This border has its padding set by the background image provided by the system, and it cannot be changed."
Still, if you add
borderBottomWidth: 0
to your styles, that should "remove" it.For
react-native-paper
, the solution would be adding the following inside your component:Should look like this:
You can make your borders invisible by adding simple styles and don’t need to install third party libraries like (react-native-paper).
And the styles are
And the output will look like the below image,
"In React Native Paper’s TextInput, you can use the theme prop to customize the input style. For example, to remove the blue underline that appears when the input is active, you can set colors.underlineColor to transparent in the theme prop. Additionally, you can set underlineColor to transparent to remove the border bottom width. Here’s an example code snippet: