What you can do is, in addition to rendering a modal when you click your button, also render an empty div. Style the div such that it has a fixed position and covers the entire screen, have a gray color, and set the opacity such that it looks like in your example above. Should also set a low/negative z-value so that it doesn't appear on a layer above your modal.