Alert extension for bulma

bulmaAlert(options, session = shiny::getDefaultReactiveDomain())

Arguments

options

List containing alert configuration. See https://bulmajs.tomerbe.co.uk/.

session

Shiny session object. Internal use.

Value

An alert message

Examples

if (interactive()) {
 library(shiny)
 library(shinybulma)
 
 ui <- bulmaPage(
   bulmaActionButton("alert", "Show alert")
 )
 
 server <- function(input, output, session) {
   observeEvent(input$alert, {
     bulmaAlert(
       list(
        type = "warning",
        title = "Warning!!!", 
        body = "Alert content", 
        confirm = "Ok", 
        cancel = "cancel",
        showHeader = TRUE
       )
     )
   })
 }
 
 shinyApp(ui, server)
}