I want to do a line like this one, but I don’t know how (btw the text on the image is in spanish, but it does not matter).
3
Pls, take a look at this link. Hope it will help. Draw horizontal rule in React Native It can be done easily by installing packages. https://daisyui.com/components/divider/
It can be done easily without adding any library. Here’s an exmaple – https://snack.expo.dev/@arjunshukla97/divider
You can draw a separator with flexbox properties even with a text or view or anything you want in the center of the line.
flexbox
<View style={{flexDirection: 'row', alignItems: 'center'}}> <View style={{flex: 1, height: 1, backgroundColor: 'black'}} /> <View> <Text style={{textAlign: 'center', paddingHorizontal:8}}>Hello</Text> </View> <View style={{flex: 1, height: 1, backgroundColor: 'black'}} /> </View>
Click here to cancel reply.
3
Answers
Pls, take a look at this link.
Hope it will help.
Draw horizontal rule in React Native
It can be done easily by installing packages.
https://daisyui.com/components/divider/
It can be done easily without adding any library. Here’s an exmaple –
https://snack.expo.dev/@arjunshukla97/divider
You can draw a separator with
flexbox
properties even with a text or view or anything you want in the center of the line.