Search code examples
reactjsreact-nativetextinput

In react-native TextInput box show a line, how to removed it


MY React-native APP I make a Input box but I get a line in Input box... How can I remove it?

<View style={styles.inputContainer}>
  <TextInput style={styles.input} onChangeText={(text) => this.setState({editTodoVal: text})} value={this.state.editTodoVal}/>
</View>

Style:

inputContainer: {
        marginTop: 5,
        padding: 10,
        flexDirection: 'row'
    },
 input: {
        height: 40,
        padding: 4,
        marginRight: 5,
        flex: 6,
        fontSize: 18,
        borderWidth: 1,
        borderColor: '#fff',
        backgroundColor: '#fff',
        borderRadius: 1,
        color: '#000',
    },

Please check my Images for more seance: Hare my input box show Line


Solution

  • By default it comes with underline, if you need to remove then use : underlineColorAndroid='transparent' . Also check documentation for more information.