Inder malviya
Inder malviya

Reputation: 141

How can i change the position of modal in ionic3?

Sample Reference of Present modalI am using modal in ionic-3, and the target devices are tablets. want to show the modal on left side of screen so is there any way to change the position and size of ionic-3 modal popup?

Upvotes: 0

Views: 2182

Answers (1)

Swapnil Patwa
Swapnil Patwa

Reputation: 4099

Pass cssClass while creating modal.

 let modal = this.modalCtrl.create(ModalPage, {data: data}, {cssClass: 'custom-modal' });

Apply CSS to the class in app.scss

.select-modal {
   background: rgba(0, 0, 0, 0.5) !important;
   padding: 20% 10%  !important;
}

As per your requirement, adjust padding.

Upvotes: 2

Related Questions