bs_vars_modal {fresh} | R Documentation |
Bootstrap modal variables
Description
Those variables can be used to customize
modal (e.g. shiny::modalDialog
in Bootstrap and Bootswatch themes.
Usage
bs_vars_modal(
md = NULL,
lg = NULL,
sm = NULL,
inner_padding = NULL,
title_padding = NULL,
title_line_height = NULL,
content_bg = NULL,
content_border_color = NULL,
content_fallback_border_color = NULL,
backdrop_bg = NULL,
backdrop_opacity = NULL,
header_border_color = NULL,
footer_border_color = NULL
)
Arguments
md |
Size in pixel for medium modal, e.g. |
lg |
Size in pixel for large modal, e.g. |
sm |
Size in pixel for small modal, e.g. |
inner_padding |
Padding applied to the modal body. |
title_padding |
Padding applied to the modal title. |
title_line_height |
Modal title line-height. |
content_bg |
Background color of modal content area. |
content_border_color |
Modal content border color. |
content_fallback_border_color |
Modal content border color (for IE8). |
backdrop_bg |
Modal backdrop background color. |
backdrop_opacity |
Modal backdrop opacity. |
header_border_color |
Modal header border color. |
footer_border_color |
Modal footer border color. |
Value
a list
that can be used in create_theme
.
Examples
bs_vars_modal(
md = "80%",
backdrop_opacity = 1,
header_border_color = "#112446",
footer_border_color = "#112446"
)
if (interactive()) {
library(shiny)
library(shinyWidgets)
ui <- fluidPage(
use_theme(
create_theme(
theme = "default",
bs_vars_modal(
md = "80%",
backdrop_opacity = 1,
header_border_color = "#112446",
footer_border_color = "#112446"
),
output_file = NULL
)
),
tags$h1("Custom modals"),
actionButton("show", "Show modal dialog")
)
server <- function(input, output, session) {
observeEvent(input$show, {
showModal(modalDialog(
title = "Important message",
"This is an important message!"
))
})
}
shinyApp(ui, server)
}
[Package fresh version 0.2.0 Index]