I have a unique design element on a website that showcases an image overflowing off a card. The image has a negative margin-top of -50, creating this effect.
Now I'm trying to replicate this design in react-native using native-base components. Here is the code snippet I am working with:
render() {
return (
<View style={styles.container}>
<Card>
<CardItem style={{ marginTop: -50, justifyContent: 'center' }}>
<Image style={styles.image} source={{ uri: this.state.band.imageComponent.link }} />
</CardItem>
</Card>
</View>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
marginTop: 150
},
image: {
width: 150,
height: 150,
)
After implementing the code, the result appears like this: React-native card
However, the image is now getting cutoff at the top instead of overflowing and overlaying the card. How can I achieve the desired overflow effect like in my original design?