> For the complete documentation index, see [llms.txt](https://kvision.gitbook.io/kvision-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kvision.gitbook.io/kvision-guide/3.-optional-ui-functionality-via-modules/toasts.md).

# Toasts

The `kvision-toastify` module contains ready to use functions to display toast messages - small, non-disruptive notification windows, which disappear automatically. To display a toast message just call one of the `primary`, `secondary`, `success`, `info`, `warning`, `danger` , `light` and `dark` functions of the `Toast` object.&#x20;

```kotlin
Toast.info("This is a toast message")

Toast.danger("There was an error!")
```

You can also pass `ToastOptions` parameter, to configure how the toast message is displayed.

```kotlin
Toast.success(
    "This is a toast message",
    options = ToastOptions(
        position = ToastPosition.TOPLEFT,
        close = true,
        duration = 10000
    )
)
```
