bs4CardLayout | R Documentation |
Bootstrap 4 container for cards
Alias to bs4CardLayout See bs4CardLayout for full details
bs4CardLayout(..., type = c("group", "deck", "columns")) boxLayout(..., type = c("group", "deck", "columns"))
... |
Slot for bs4Dash cards. |
type |
Container type. See https://getbootstrap.com/docs/4.0/components/card/#card-layout for more details. |
Cards must have width argument set to NULL.
Other cards:
bs4SocialCard()
,
bs4TabCard()
,
bs4UserCard()
,
descriptionBlock()
,
renderbs4InfoBox()
,
renderbs4ValueBox()
if (interactive()) { library(shiny) library(bs4Dash) # with group shinyApp( ui = dashboardPage( header = dashboardHeader(), sidebar = dashboardSidebar(), body = dashboardBody( boxLayout( type = "group", lapply(1:4, function(i) { box( width = NULL, title = paste("Card", i), closable = FALSE, collapsible = FALSE, "Lorem ipsum is so fun!" ) }) ) ), controlbar = dashboardControlbar(), title = "Box layout group" ), server = function(input, output) {} ) # with deck shinyApp( ui = dashboardPage( header = dashboardHeader(), sidebar = dashboardSidebar(), body = dashboardBody( boxLayout( type = "deck", lapply(1:4, function(i) { box( width = NULL, title = paste("Card", i), closable = FALSE, collapsible = FALSE, "Lorem ipsum is so fun!" ) }) ) ), controlbar = dashboardControlbar(), title = "Box layout deck" ), server = function(input, output) {} ) # with columns shinyApp( ui = dashboardPage( header = dashboardHeader(), sidebar = dashboardSidebar(), body = dashboardBody( boxLayout( type = "columns", lapply(1:12, function(i) { box( width = NULL, title = paste("Card", i), closable = FALSE, collapsible = FALSE, height = if (i %% 2 == 1) "200px", status = if (i %% 2 == 0) "primary", if (i %% 2 == 0) "Lorem ipsum is so fun!", if (i == 1 | i == 7 | i == 12) img(src = "https://via.placeholder.com/290x160") ) }) ) ), controlbar = dashboardControlbar(), title = "Box layout columns" ), server = function(input, output) {} ) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.