Categories
React Native Answers

How to add a modal background with React Native?

Spread the love

To add a modal background with React Native, we add the Modal component.

For instance, we write

<Modal
   theme={{
     colors: {
       backdrop: 'transparent',
     },
   }}
  {...otherProps}
>
 {children}
</Modal>

to add the Modal component with the children prop as its content.

We set the backdrop color by setting the colors.backdrop property in theme.

Leave a Reply

Your email address will not be published.

If you like the content of this blog, subscribe to my email list to get exclusive articles not available to anyone else.