# 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"
    }
  }
]
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jolzee.gitbook.io/leopard/components/toasts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
