So far the easiest way is to modify the ion-modal-view tag css.
<ion-modal-view style="width: 90%; height: 90%;">
You might also want to play with the top, right, left and bottom property as well to centre the modal on screen.
For e.g if the width is 90% and height 90%, it should be 5% from all sides to center it
As far as I know, you’d have to calculate it to make the modal as high as the content.
A possible way would be to:
Get the height of all child elements
divide the child elements height with screen height (probably add a few pixels here and there for padding purposes) and multiply by a 100 for the percent value.
optional: divide the result by 2 to get the optimal top and bottom values to have it centered vertically
Ofcourse you’d also want to add a condition in this matter if the content is larger than the screen on which youd just want the content of the modal to be scrollable.
Ofcourse there are better and more optimal ways to do it but this is the first idea that came in mind.
If something sounds unclear, feel free to message me back.
For me once i build a modal it take the height of the entire screen, even after implementing the changes suggested by @qrider, it worked on the width but the height still remain the height of the screen. Any idea on how to solve this yet? I just want the modal to be an overlay over the main page