# Toast Notification

**URL:** <https://forum.ionicframework.com/t/toast-notification/1067>\
**Category:** ionic-v1\
**Created:** [February 13, 2014, 12:02pm UTC](https://forum.ionicframework.com/t/toast-notification/1067 "2014-02-13T12:02:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregorypratt](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gregorypratt/32/64031_2.png) [@gregorypratt](https://forum.ionicframework.com/u/gregorypratt)\
**Post date:** [February 13, 2014, 12:02pm UTC](https://forum.ionicframework.com/t/toast-notification/1067/1 "2014-02-13T12:02:19Z")

</div>

I think a toast could be handy, duration and position could options.

Similar to this: [http://developer.android.com/guide/topics/ui/notifiers/toasts.html](http://developer.android.com/guide/topics/ui/notifiers/toasts.html)

---

<div class="post-metadata">

**Author:** ![AdamTuttle](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@AdamTuttle](https://forum.ionicframework.com/u/AdamTuttle)\
**Post date:** [February 13, 2014, 2:46pm UTC](https://forum.ionicframework.com/t/toast-notification/1067/2 "2014-02-13T14:46:06Z")

</div>

I’ve been using this: [https://github.com/jirikavi/AngularJS-Toaster](https://github.com/jirikavi/AngularJS-Toaster)

It doesn’t look like Android toasts out of the box but it should be pretty easy to customize if that’s the look you’re after.

---

<div class="post-metadata">

**Author:** ![raphael\_cohen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@raphael\_cohen](https://forum.ionicframework.com/u/raphael_cohen)\
**Post date:** [February 13, 2014, 3:35pm UTC](https://forum.ionicframework.com/t/toast-notification/1067/3 "2014-02-13T15:35:02Z")

</div>

I think there is a cordova plugin which does it:

> **[EddyVerbruggen/Toast-PhoneGap-Plugin](https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin)**
>
> :beers: A Toast popup plugin for your fancy Cordova app - EddyVerbruggen/Toast-PhoneGap-Plugin

---

<div class="post-metadata">

**Author:** ![gregorypratt](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gregorypratt/32/64031_2.png) [@gregorypratt](https://forum.ionicframework.com/u/gregorypratt)\
**Post date:** [February 14, 2014, 9:27am UTC](https://forum.ionicframework.com/t/toast-notification/1067/4 "2014-02-14T09:27:57Z")

</div>

Hi, thanks for your suggestions, appreciate there are alternatives but I think it should be part of the framework.

For instance I could roll my own Loading overlay but why when Ionic provides me with one? Toast is a standard UI feature (especially in the Android world) so Ionic should have the equivalent (in my opinion of course!).

---

<div class="post-metadata">

**Author:** ![andy](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/andy/32/64157_2.png) [@andy](https://forum.ionicframework.com/u/andy)\
**Post date:** [February 14, 2014, 8:05pm UTC](https://forum.ionicframework.com/t/toast-notification/1067/5 "2014-02-14T20:05:08Z")

</div>

I like it!

> <https://github.com/ionic-team/ionic/issues/608>
>
> Add toast component, from Android
> example from KitKat: http://i.imgur.com/vYK4wwrl.png
> Options:
> region: top or middle or bottom or a number percent (default bottom)
> tap to close:...

Planned it for post-1.0 (almost everything until 1.0 is bug fixes).

---

<div class="post-metadata">

**Author:** ![saniyusuf](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/saniyusuf/32/13572_2.png) [@saniyusuf](https://forum.ionicframework.com/u/saniyusuf)\
**Post date:** [May 18, 2014, 4:32am UTC](https://forum.ionicframework.com/t/toast-notification/1067/7 "2014-05-18T04:32:22Z")

</div>

Any Update on this? Something In the line of [http://codeseven.github.io/toastr/demo.html](http://codeseven.github.io/toastr/demo.html) will be handy with themes similar to the Header bar colours.

---

<div class="post-metadata">

**Author:** ![jmondragon](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@jmondragon](https://forum.ionicframework.com/u/jmondragon)\
**Post date:** [July 15, 2014, 1:19am UTC](https://forum.ionicframework.com/t/toast-notification/1067/8 "2014-07-15T01:19:58Z")

</div>

I also wanted a toast feature built-in, so I looked through the source code, and it looks like $ionicLoading can be used to sort of do what I want like this:

```
$ionicLoading.show({ template: 'Item Added!', noBackdrop: true, duration: 2000 });

```

This shows the text with no backdrop and automatically hides it after 2 seconds.

Just thought I’d share.

---

<div class="post-metadata">

**Author:** ![sar009](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@sar009](https://forum.ionicframework.com/u/sar009)\
**Post date:** [July 16, 2014, 6:43am UTC](https://forum.ionicframework.com/t/toast-notification/1067/9 "2014-07-16T06:43:07Z")

</div>

this works like charm. Only if it had parameters of position it would have been awsome.

---

<div class="post-metadata">

**Author:** ![djskinner](https://avatars.discourse-cdn.com/v4/letter/d/45deac/32.png) [@djskinner](https://forum.ionicframework.com/u/djskinner)\
**Post date:** [July 16, 2014, 8:49pm UTC](https://forum.ionicframework.com/t/toast-notification/1067/10 "2014-07-16T20:49:50Z")

</div>

I’m currently using $cordovaToast from [ngCordova](http://ngcordova.com/docs/), which has positioning options.

---

<div class="post-metadata">

**Author:** ![abbara](https://avatars.discourse-cdn.com/v4/letter/a/35a633/32.png) [@abbara](https://forum.ionicframework.com/u/abbara)\
**Post date:** [December 6, 2014, 8:59pm UTC](https://forum.ionicframework.com/t/toast-notification/1067/11 "2014-12-06T20:59:10Z")

</div>

Another one I’ve tried is creating an ionic action sheet without buttons.

[http://ionicframework.com/docs/api/service/$ionicActionSheet/](http://ionicframework.com/docs/api/service/%24ionicActionSheet/)

It looks pretty good on a phone but it’s too small on a tablet for my liking. If the CSS is modified a lot it’d look a lot nicer. I’d love to go for a look like this for toasters and snackbars:

[http://www.google.com/design/spec/components/snackbars-toasts.html](http://www.google.com/design/spec/components/snackbars-toasts.html)

But haven’t had the time to write some CSS for it.

---

<div class="post-metadata">

**Author:** ![mikkokam](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mikkokam/32/7519_2.png) [@mikkokam](https://forum.ionicframework.com/u/mikkokam)\
**Post date:** [December 20, 2014, 9:33am UTC](https://forum.ionicframework.com/t/toast-notification/1067/12 "2014-12-20T09:33:06Z")

</div>

Thanks for this!  
I added a PhoneGap plugin, and use $ionicLoading as a fallback.

I’ve packaged some things (toast, loading, etc.) to a service ‘UI’ to be used in all my projects. Below a skeleton of the actual:

```
.service('UI', function($http, $window, $q, $ionicLoading, $timeout){

  this.toast = function(msg, duration, position){
    if(!duration)
        duration = 'short';
    if(!position)
        position = 'top';

    // PhoneGap? Use native:
    if($window.plugins){
        if($window.plugins.toast)
            $window.plugins.toast.show(msg, duration, position,
                function(a){}, function(err){})
        return;
    }
    
    // … fallback / customized $ionicLoading:
    $ionicLoading.show({
        template: msg,
        noBackdrop: true,
        duration: (duration == 'short' ? 700 : 1500)
    });

  }
...

```

Add this to css to make the loading look like a toast placed at the **top** on Android. Add in some extra classes and triggers to have it programmatically placed top/middle/bottom - just like the plugin has. Shall add that next.  
Would be awesome to have toast as a component in Ionic, though…

```
.loading-container{
  -webkit-align-items: flex-start;
  -moz-align-items: flex-start;
  align-items: flex-start;
  padding-top: 54px;
  .loading{
	border-radius: 30px;
  }
}

```

The outcome:

 ![image](https://global.discourse-cdn.com/ionicframework/original/2X/2/24fe067a832693738035ed0cd0ff344ef31fd3bb.png)

---

<div class="post-metadata">

**Author:** ![slashwhatever](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@slashwhatever](https://forum.ionicframework.com/u/slashwhatever)\
**Post date:** [March 9, 2015, 9:43pm UTC](https://forum.ionicframework.com/t/toast-notification/1067/13 "2015-03-09T21:43:03Z")

</div>

Sorry for the n00b question, but if cordova.js is not available during development (as per the comment above cordova.js when you start building an app from a template), how do we use the Cordova Toast plugin in development?

---

<div class="post-metadata">

**Author:** ![nnnnnorthhhhh](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/nnnnnorthhhhh/32/98566_2.png) [@nnnnnorthhhhh](https://forum.ionicframework.com/u/nnnnnorthhhhh)\
**Post date:** [March 10, 2015, 5:11am UTC](https://forum.ionicframework.com/t/toast-notification/1067/14 "2015-03-10T05:11:06Z")

</div>

Deploy it to an actual device or emulator to test!

---

<div class="post-metadata">

**Author:** ![slashwhatever](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@slashwhatever](https://forum.ionicframework.com/u/slashwhatever)\
**Post date:** [March 10, 2015, 2:12pm UTC](https://forum.ionicframework.com/t/toast-notification/1067/15 "2015-03-10T14:12:20Z")

</div>

Thanks! I ended up figuring this out after a little digging!

---

<div class="post-metadata">

**Author:** ![rajeshwarpatlolla](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rajeshwarpatlolla/32/70759_2.png) [@rajeshwarpatlolla](https://forum.ionicframework.com/u/rajeshwarpatlolla)\
**Post date:** [June 24, 2015, 11:24am UTC](https://forum.ionicframework.com/t/toast-notification/1067/16 "2015-06-24T11:24:56Z")

</div>

I was been searching for a toast notification plugin for my project. I have created a bower component for toast. Please have a look at the [bower component](https://github.com/rajeshwarpatlolla/ionic-toast) i have created. I think it might help you.

---

<div class="post-metadata">

**Author:** ![xlaxial](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/xlaxial/32/91341_2.png) [@xlaxial](https://forum.ionicframework.com/u/xlaxial)\
**Post date:** [July 2, 2015, 3:51pm UTC](https://forum.ionicframework.com/t/toast-notification/1067/17 "2015-07-02T15:51:33Z")

</div>

Thanks for that @rajeshwarpatlolla

---

<div class="post-metadata">

**Author:** ![mkolodny](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@mkolodny](https://forum.ionicframework.com/u/mkolodny)\
**Post date:** [August 28, 2015, 2:19am UTC](https://forum.ionicframework.com/t/toast-notification/1067/18 "2015-08-28T02:19:14Z")

</div>

This is my favorite one I’ve seen: [http://tamerayd.in/ngToast](http://tamerayd.in/ngToast)

---

<div class="post-metadata">

**Author:** ![sindri](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sindri/32/72335_2.png) [@sindri](https://forum.ionicframework.com/u/sindri)\
**Post date:** [December 1, 2015, 4:54pm UTC](https://forum.ionicframework.com/t/toast-notification/1067/19 "2015-12-01T16:54:39Z")

</div>

I tried this ngToast and almost everything works great i’m only having problem with animations at the moment. I configure the toast like this:

```
 ngToast.configure({
        verticalPosition: 'bottom',
        horizontalPosition: 'center',
        maxNumber: 1,
        animation: 'slide'
    });

```

When serving this and triggering a toast everthing works fine but when i try on the emulator the slide animation looks alright when it slides in but when it’s suppose to slide out it just disappears. Have you had any similar problems with this ?

---

<div class="post-metadata">

**Author:** ![Taehwa](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/taehwa/32/95051_2.png) [@Taehwa](https://forum.ionicframework.com/u/Taehwa)\
**Post date:** [December 11, 2015, 2:57pm UTC](https://forum.ionicframework.com/t/toast-notification/1067/20 "2015-12-11T14:57:25Z")

</div>

This is very simple and nice !!  
Thank you @rajeshwarpatlolla

---

<div class="post-metadata">

**Author:** ![rajeshwarpatlolla](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rajeshwarpatlolla/32/70759_2.png) [@rajeshwarpatlolla](https://forum.ionicframework.com/u/rajeshwarpatlolla)\
**Post date:** [December 11, 2015, 4:01pm UTC](https://forum.ionicframework.com/t/toast-notification/1067/21 "2015-12-11T16:01:18Z")

</div>

@Taehwa, thanks for using and you are welcome.

[Next page](https://forum.ionicframework.com/t/toast-notification/1067.md?page=2)
