React-native-router-flux: How to style Modal to have a transparent background, like an overlay?

Created on 28 May 2016  路  4Comments  路  Source: aksonov/react-native-router-flux

Version

  • react-native-router-flux latest
  • react-native 26.0.1
question

Most helpful comment

I achieved this as follows:

  • in your render method where you are _rendering_ Modal, pass a prop transparent={true}
  • add a _single_ View child to your modal (put all other things inside this View) and apply style to it with backgroundColor = 'rgba(r, g, b, a)' as described above

react-native v0.46.4

All 4 comments

backgroundColor:'rgba(255,255,255,0.5'

I believe it is out of scope of this component. Example project has modal popup with usage of 3rd party component.

I achieved this as follows:

  • in your render method where you are _rendering_ Modal, pass a prop transparent={true}
  • add a _single_ View child to your modal (put all other things inside this View) and apply style to it with backgroundColor = 'rgba(r, g, b, a)' as described above

react-native v0.46.4

backgroundColor:'rgba(255,255,255,0.5')

Was this page helpful?
0 / 5 - 0 ratings