Ionic2 no-fullscreen modal

Hey
I would like to open a modal, but not fullscreen, with a transparent grey layer around it.
Is it possible??
Thanks

It’s possible but not supported by default, i.e. some customizations are required (details in the linked post):

I’m looking for similar solution. Is it possible to customize it like POPUP or ALERT window. I like this page/window flow over parent page with transparency.

Hello guys, use this scss to add the transparent background, This also shows the modal 50% of the screen:

ion-page.modal {
  padding: 30px;
  background: rgba(0,0,0,0.5);
}
.disabledfeature{
  color: #8f8f8f;
}
2 Likes

This works well! Thanks!

1 Like

Ignore or remove the .disabledfeature class its not required.

BTW it’s not true, that it’s not supported by default. You can see it on tablets.

I haven’t checked on tablets but i have tested it on android and iOS devices itt works. What is the issue you are facing?

The problem with this solution is that I don’t need this for all the modals of my applicationl. Some open fullscreen, and some don’t. Any ideas on this???

Thanks!

4 Likes