Can't add borderStyle for single side border of a view
See original GitHub issueI wanna set borderStyle for bottom border of a view, so I have following code:
<View style={{borderColor: 'red', borderWidth: 0, borderBottomWidth: 1, borderStyle: 'dashed'}}>
<Text>Example</Text>
</View>
As well, I get warning like this: Unsupported dashed / dotted border style
.
Is there any ways to solve the problem ? Thanks any way…
- version of react native: 0.30.0
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
React native adding border to the one side of the view
In react native there are view's style property to set individual side width. You can use borderTopWidth for Top Border.
Read more >border-style - CSS: Cascading Style Sheets - MDN Web Docs
The border-style shorthand CSS property sets the line style for all four sides of an element's border.
Read more >Apply or remove cell borders on a worksheet
Add a border line style - Click the Borders arrow > Border Style, and then pick a line style option.
Read more >CSS Border Sides
If the border-style property has three values: border-style: dotted solid double;. top border is dotted; right and left borders are solid; bottom border...
Read more >Border Width
Use the border-{x|y}-{width} utilities to set the border width on two sides of an element at the same time. border-x-4. border-y-4.
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
A workaround might be to put a view with a full dashed border within the containing view, push it to the bottom and give it the border with a height of 0 (or you might need to do 1). This will make it seem like you have a border just on the bottom.
Try to add
borderRadius: 'your value here'