toastUpdate {shinyToastify}R Documentation

Update a toast

Description

Update a toast in a Shiny application. Run shinyToastifyExample("toastUpdate") for an example.

Usage

toastUpdate(
  session,
  toastId,
  text,
  type = "default",
  position = "top-right",
  transition = "slide",
  autoClose = 5000,
  hideProgressBar = FALSE,
  closeOnClick = TRUE,
  rtl = FALSE,
  pauseOnFocusLoss = TRUE,
  draggable = TRUE,
  draggableDirection = "x",
  draggablePercent = 80,
  pauseOnHover = TRUE,
  className = NULL,
  toastClassName = NULL,
  bodyClassName = NULL,
  progressClassName = NULL,
  style = NULL,
  JScallback = NULL
)

Arguments

session

the Shiny session object

toastId

the id of the toast to be updated (id argument)

text

the text displayed in the toast; this can be a character string, an html element created with the HTML function, or a shiny.tag object such as tags$span(style = "color:lime;", "Message")

type

toast type, one of "info", "success", "warning", "error", "default" or "dark"

position

toast position, one of "top-left", "top-right", "top-center", "bottom-left", "bottom-right" or "bottom-center"

transition

the transition effect, one of "slide", "zoom", "flip" or "bounce"

autoClose

either a number, the time in ms to close the toast, or FALSE to close the toast manually

hideProgressBar

Boolean, whether to hide the progress bar

closeOnClick

Boolean, whether to dismiss the toast on click

rtl

Boolean, right to left

pauseOnFocusLoss

Boolean, whether to pause the toast on focus loss

draggable

Boolean, ability to drag the toast to remove it

draggableDirection

"x" or "y"

draggablePercent

the percentage of the width of the toast needed to remove it by dragging

pauseOnHover

Boolean, whether to pause the toast on hover

className

name of a CSS class applied to the container

toastClassName

name of a CSS class applied on the toast wrapper

bodyClassName

name of a CSS class applied on the toast body

progressClassName

name of a CSS class applied on the progress bar

style

inline style applied to the container, e.g. list(boxShadow = "rgba(0, 0, 0, 0.56) 0px 22px 30px 4px")

JScallback

some JavaScript code given as a string to be executed whenever the toast is closed; it will have an effect only if the position argument differs from the one of the toast to be updated

Value

No return value, called for side effect.


[Package shinyToastify version 2.0.0 Index]