bulmaNotification(
  id = NULL,
  options = NULL,
  session = shiny::getDefaultReactiveDomain()
)

Arguments

id

Notification target. It will be attached on the provided DOM element. If id is NULL, the notification is attached to the body.

options

A list of notification options. See https://github.com/VizuaaLOG/BulmaJS.

session

A valid shiny session.

Author

David Granjon, dgranjon@ymail.com

Examples

if (interactive()) {
 library(shiny)

 ui <- bulmaPage(
  bulmaActionButton("show_notif", "Show notification"),
  div(id = "target", style = "top: 0px; right: 0px; position: absolute;")
 )
 
 server <- function(input, output, session) {
  observeEvent(input$show_notif, {
    bulmaNotification(
      id = "target", 
      options = list(
        body = "This is the message",
        color = "info",
        dismissInterval = 200000,
        isDismissable = TRUE
      )
    )
  })
 }
 shinyApp(ui, server)
}