Shashika Virajh
Shashika Virajh

Reputation: 9487

Remove underline from react-native TextInput

I want to remove the underline of a TextInput of my react-native application. I tried with borderBottomWidth but it did not work. How can I achieve this on Android and IOS.

Upvotes: 2

Views: 6050

Answers (4)

Mathieu Morand
Mathieu Morand

Reputation: 61

The solution I found in code inspection is on the TextInput, you could use the :

inputContainerStyle={{borderBottomWidth:0}}

Upvotes: 0

eureka
eureka

Reputation: 181

<TextInput underlineColorAndroid='transparent'>

by this you can remove it.

Upvotes: 3

Chirag Sharma
Chirag Sharma

Reputation: 888

Its really simple

In iOS we dont have underline.

and for android just add this prop

<TextInput underlineColorAndroid={'rgba(0,0,0,0)'}> </TextInput>

Upvotes: 4

Petr Lazarev
Petr Lazarev

Reputation: 3182

You should set borderWidth: 0

Example:

<TextInput 
  style={{borderWidth: 0}}
/>

Upvotes: 1

Related Questions