Leopard Chat Client
  • Quick Start
  • Screenshots
  • Setup
    • Extension Helper
    • Context Variables
      • Greeting Message
      • Channel
      • User's Time Zone
      • Location Context Parameters
    • Build Variables
  • Content Styling
    • CSS Styles
    • Icons
    • Markdown & HTML
  • Components Simple Syntax
  • Components
    • Answer Borders
    • Audio Player
    • Auto Open Leopard with Link
    • Alerts
    • Buttons and Lists
    • Card
    • Response Icons
    • Date & Time Pickers
    • Emergency Button
    • Expensive Operations
    • Field Masks
    • Chat Field Types (Email, Password, Location, Upload)
    • Forms
      • Feedback Form
      • Custom Forms
        • Example Config
        • Postback Object
        • Button Object
        • Field Types
        • Style Object
        • Icons Object
        • Masks
        • Validation
    • Google Map
    • Help Text
    • HTML Modal
    • Hyperlinks
    • Images
      • Image
      • Image Carousel
    • Tables
      • Tables - Simple
      • Tables - Advanced
    • Theme Change
    • Toasts
    • Language Auto Switch
    • Minimize Chat after Delay
    • Multiple Components - Same Response
    • Modal Size & Positioning
    • Open Long Response in Modal
    • Print Icon
    • Prompt Trigger Polling
    • Splitting Answers - Chunks
    • Video Player
  • Administration Area
    • Solution Configuration
    • Demo Mode - iFrames & URLs
    • ASR and TTS
  • Integrations
    • Logging / Reporting
    • Social Authentication
    • Live Chat
  • Embedding / Production
Powered by GitBook
On this page
  • Single Toast
  • Output Parameter
  • Multiple Toasts
  • Output Parameter
  1. Components

Toasts

You can signal Leopard to display toasts.

PreviousTheme ChangeNextLanguage Auto Switch

Last updated 5 years ago

Single Toast

Output Parameter

Display a single Toast

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

Output Parameter

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"
    }
  }
]
green = success / blue = info / red = error / orange = warning