I need to display a dotted line in a view
I have tried borderTopWidth: 1, borderStyle: 'dashed'
for a view.
In React, you use the self-closing <br> tag to produce a line break between the text or a section, whereas in HTML you'd use <br> …
To insert a line break into a text component in react native we can add the {'\n'} character string or add the next line in the string literal.
You can try this one also, it give you perfect dotted line.
<View style={{borderWidth:0.3, borderStyle:'dashed', borderRadius:1,borderColor:'black'}}></View>
Just add borderRadius
it will work
<View style={{
borderStyle: 'dotted',
borderWidth: 1,
borderRadius: 1,
}}>
</View>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With