card | R Documentation |
Widely used Bootstrap feature with improvements to allow collapse, minimize and closing
card(
...,
title = "Standard Card",
collapsed = FALSE,
bg.fade = TRUE,
width = 12,
alert.text = NULL,
alert.bg = c("primary", "warning", "secondary", "info", "success", "danger"),
toolbar = NULL,
header = TRUE,
draggable = TRUE,
id = NULL
)
... |
The elements to include within the body of the card |
title |
The text to display in the header title |
collapsed |
If |
bg.fade |
If |
width |
Select a width from 1 to 12 to indicate the size of the card |
alert.text |
Enter text for the alert portion. Leave as NULL to exclude the alert |
alert.bg |
Indicate the type of alert to include, choices are "primary", "warning", "secondary", "info", "success", "danger" |
toolbar |
The default is NULL, which means all toolbar will be displayed use this to set what toolbar to show. |
header |
If |
draggable |
If |
id |
unique card id |
HTML code of the container with a class called card that holds the items
For more information on the features of the card, visit the examples section of the help documentation
if (interactive()) {
card(
title = "Standard card",
collapsed = TRUE,
alert.text = "An alert for the content",
alert.bg = "warning",
toolbar = list(collapse = TRUE,
maximize = TRUE, close = FALSE, menu = TRUE),
shiny::h3("Sample text"),
"Lorem www.pharmacometric.com"
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.