Set mode of alert and toast


Quick question. With html element it is easy to set the mode of the component with mode=md or mode=ios

However is there a way to do the same on alert (I would like to set it to md) and toast (I would like to set it to ios :slight_smile:)

Do you maybe know how to do it?

You are in luck, you can actually call a setMode method on the alert object :smiley:

Like this:

let alert = this.alertCtrl.create({

About the toast though, I am not sure whether it looks much different on IOS as there is no exact native equivalent of toast there. So, I believe ionic would give it more or less the same look & feel. But, if you still need something then probably you can tweak some css.


Thanks a lot. For the toast I just see that it is more beautiful with ios mode :slight_smile:

1 Like

You are welcome! Cool then lets throw a toast :+1:

Totally agree :beers:

1 Like

Can you post an example of how you implement this with toast? I try using toast.setMode(β€œios”) but it doesnt work.