A wrapper around the `toastr` JavaScript library that uses our preferred default argument values.

showToast(
  type,
  message,
  title = NULL,
  .options = list(positionClass = "toast-bottom-center", progressBar = TRUE, timeOut =
    4000, closeButton = TRUE, newestOnTop = FALSE, preventDuplicates = FALSE,
    showDuration = 300, hideDuration = 1000, extendedTimeOut = 1000, showEasing =
    "swing", hideEasing = "swing", showMethod = "fadeIn", hideMethod = "fadeOut"),
  session = shiny::getDefaultReactiveDomain()
)

Arguments

type

length 1 character vector. Valid values are "success", "error", "warning", and "info"

message

the toast message

title

the toast title. Defaults to NULL

.options

other options to pass to the toastr JavaScript library. See https://codeseven.github.io/toastr/demo.html for a full demo of options.

session

the Shiny session. Defaults to shiny::getDefaultReactiveDomain().

Value

`invisible()`