Display a modal

bulmaModal(id, options, session = shiny::getDefaultReactiveDomain())

Arguments

id

Unique modal id.

options

Modal configuration. See https://github.com/VizuaaLOG/BulmaJS.

session

A valid shiny session.

Examples

library(shiny)
ui <- bulmaPage(
 bulmaActionButton("show_modal", "Show modal"),
 bulmaActionButton("show_modal2", "Show modal 2")
)

server <- function(input, output){
 observeEvent(input$show_modal, {
   bulmaModal(
    id = "mymodal", 
    list(
     title = "Modal title",
     body = "Modal content"
    )
   )
 })
 observeEvent(input$show_modal2, {
   bulmaModal(
    id = "mymodal2", 
    list(
     title = "Modal title 2",
     body = "Modal content 2"
    )
   )
 })
}

if(interactive())
 shinyApp(ui, server)