Reputation: 123
I'm new at react native development, I want to make a card with a semi circle like this:
I tried something with :
borderRadius:'45%',
bottom:10,
right:10,
And get that this result, but isn't what I need
Upvotes: 0
Views: 1076
Reputation: 739
You can do this works
<View style={{
width: '90%',
height: 160,
backgroundColor: 'white',
elevation: 4,
borderRadius: 40,
overflow: 'hidden',
alignSelf: 'center'
}}>
<View style={{
width: 100,
height: 100,
justifyContent: 'center',
alignItems: 'center',
borderBottomRightRadius: 80,
borderTopRightRadius: 80,
backgroundColor: '#f29a50',
elevation: 4,
}}>
{/* Your Icon */}
</View>
</View>
[1]: https://i.sstatic.net/4tcEh.png
Upvotes: 2
Reputation: 123
Putting overflow: "hidden"
on the parent View solved the overlay issue.
Upvotes: 0