---
description: You can signal Leopard to display toasts.
---

# Toasts



<div align="left"><img src="https://4062709520-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-La71Iy76rotlqbCOWoQ%2F-M38fA2VTbv58tmJ9YOH%2F-M38hLYFrg2sfS7s5wn1%2Ftoast.png?alt=media&#x26;token=f695371d-8c06-41a0-a1b2-7995406c298e" alt="green = success / blue = info / red = error / orange = warning"></div>

## Single Toast

### Output Parameter

> Display a single Toast

```groovy
toast = 

{
  "type"   :  "success", // [simple/success/info/warning/error]
  "title"  :  "Success", // optional
  "body"   :  "You successfully triggered a snotify alert",
  "config" :  {
    "timeout"         :  5000, // default: 2000 = 2 seconds
    "showProgressBar" :  true, // default: true
    "closeOnClick"    :  true, // default: true
    "pauseOnHover"    :  true, // default: true
    "icon"            :  "https://wi.presales.artificial-solutions.com/media/bulb.svg", // optional - type already defines icons
    "position"        :  "leftBottom" // [leftBottom, leftTop, leftCenterm rightTop, rightCenter, rightBottom, centerTop, centerCenter, centerBottom]
  }
}
```

## Multiple Toasts

Display multiple Toasts - displayed 2 seconds apart

<div align="left"><img src="https://4062709520-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-La71Iy76rotlqbCOWoQ%2F-M3By_a2b8hD7LoIZRFW%2F-M3Bzj86lPZ78R1J2bqV%2Ftoasts-min.gif?alt=media&#x26;token=60cd5263-6b69-40be-8bb9-13a612bc2e25" alt=""></div>

### Output Parameter

```javascript
toast =

[
  {
    "type"   : "success",
    "title"  : "Success",
    "body"   : "This is a success toast",
    "config" : {
      "timeout"         : 5000,
      "showProgressBar" : true,
      "closeOnClick"    : true,
      "pauseOnHover"    : true,
      "position"        : "leftBottom"
    }
  },
  {
    "type"   : "info",
    "title"  : "Information",
    "body"   : "This is an info toast",
    "config" : {
      "timeout"         : 5000,
      "showProgressBar" : true,
      "closeOnClick"    : true,
      "pauseOnHover"    : true,
      "position"        : "leftBottom"
    }
  },
  {
    "type"   : "warning",
    "title"  : "Warning",
    "body"   : "This is an warning toast",
    "config" : {
      "timeout"         : 5000,
      "showProgressBar" : true,
      "closeOnClick"    : true,
      "pauseOnHover"    : true,
      "position"        : "leftBottom"
    }
  },
  {
    "type"   : "error",
    "title"  : "Error",
    "body"   : "This is an warning toast",
    "config" : {
      "timeout"         : 5000,
      "showProgressBar" : true,
      "closeOnClick"    : true,
      "pauseOnHover"    : true,
      "position"        : "leftBottom"
    }
  }
]
```
