inst/examples/TypeAndTransition/server.R

library(shiny)
library(shinyToastify)

shinyServer(
  function(input, output, session){

    observeEvent(input[["btn"]], {

      toastType <- input[["type"]]

      html <- HTML(
        '<span style="font-size: 30px; font-family: cursive;">',
        paste0(toastType, " toast"),
        '</span>'
      )

      showToast(
        session,
        input,
        text = html,
        type = toastType,
        transition = input[["transition"]],
        autoClose = 3000
      )

    })

  }
)

Try the shinyToastify package in your browser

Any scripts or data that you put into this service are public.

shinyToastify documentation built on July 31, 2021, 5:06 p.m.