Description Usage Arguments Note See Also Examples
Bootstrap 4 container for cards
Alias to bs4CardLayout See bs4CardLayout for full details
1 2 3 |
... |
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()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | 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.