useBootBox {standby} | R Documentation |
BootBox
Description
Bootstrap modals made easy.
Usage
useBootBox()
bootBox(
title = "Your title",
message = "Your message here...",
size = "small",
close_on_escape = TRUE,
show = TRUE,
backdrop = NULL,
close_button = TRUE,
animate = TRUE,
class = NULL,
session = getDefaultReactiveDomain()
)
Arguments
title |
Adds a header to the dialog. |
message |
Text displayed in the dialog. |
size |
Adds the relevant Bootstrap modal size class to the dialog wrapper. Valid values are:
|
close_on_escape |
Logical; if |
show |
Logical; if |
backdrop |
Logical; if
|
close_button |
Logical; if |
animate |
Logical; if |
class |
Custom CSS class (using Animate.css). |
session |
Shiny session object. |
Value
None
Functions
-
useBootBox
: Dependencies to include in your UI. -
bootBox
: Display modals.
Examples
if (interactive()) {
library(shiny)
library(standby)
ui <- fluidPage(
useBootBox(), # include dependencies
actionButton(inputId = "btn",
label = "BootBox Demo")
)
server <- function(input, output, session) {
observeEvent(input$btn, {
# display modal
bootBox("Hey there!", "Thank you for exploring standby!")
})
}
shinyApp(ui, server)
}