Overlay style not working as expected
See original GitHub issueTrying to recreate the bottom half screen popup card you see on Google Maps when you tap on a pin but can’t make it work with Overlay. More specifically, I cannot seem to position the Overlay off-center at all. With the native Modal I am able to set justifyContent: ‘flex-end’ to generate something 90% similar (still haven’t figured out how to allow interaction with the content outside of the modal without closing the modal).
Code
<Modal style={styles.bottomModal}
backdropColor={'transparent'}
transparent
>
{this._renderModalContent()}
</Modal>
<Overlay overlayStyle={styles.bottomModal}
backdropColor={'transparent'}
>
{this._renderModalContent()}
</Overlay>
Style
const styles = StyleSheet.create({
bottomModal: {
justifyContent: 'flex-end',
margin: 0,
},
});
Here’s the snack: https://snack.expo.io/rkJcCSZfL
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
css - Hover function and rendering not working as expected ...
I'd like my image to show an overlay upon hover that 1. is same size/dimension 2. has a bg color with opacity and...
Read more >Tikz overlay not working as expected - LaTeX Stack Exchange
I am using pdflatex to convert following code into a pdf, and I do not get the expected overlay. \begin{lstlisting}[language=nasm,style=nasm, ...
Read more >Overlay layer not working when loading page first time
But since a few days I am facing a strange behavior. I created a slider with an overlay layer showing some text on...
Read more >Color mode (multiply) for image overlay - E-Learning Heroes
I need to overlay 2 images, the top one with overlay mode. I noticed this isn't working as it should. The top image...
Read more >Issue with sliding overlay nav bar with custom CSS - Questions
The problem is that the sliding panel doesn't behave like expected: instead of overlays the canvas it pushes it and resizing it.
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

There is also the fact that RNE uses the
react-nativeModalbut your snack uses thereact-native-modalModal. So you are using 2 different modals. In RNE 2.0.0, they added the propModalComponentto Overlay to pass in a customModal, but even with that, I haven’t been able to get the animation working. But I still don’t see this question answered. If you are already usingreact-native-modal, what is the value add from theOverlaycomponent?@iqbalfaisal I can confirm that
containerStyleis/was not being consumed as expected. Rather, it’s the style being applied to the backdrop. This isn’t useful, as the backdrop is not a parent/container to the actualViewelement containing the modal. See the commit HERE and you can see what I’m talking about, this prop was actually renamed tobackdropStyle.The container element you would expect the
containerStyleprop to be applied to is actually only using the internal stylesheetscontainer. This seems like an oversight, I would expect acontainerStyleprop to be merged into the styles for that element on line 39