Display a modal
bulmaModal(id, options, session = shiny::getDefaultReactiveDomain())
Unique modal id.
Modal configuration. See https://github.com/VizuaaLOG/BulmaJS.
A valid shiny session.
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)