card {bslib} | R Documentation |
A general purpose container for grouping related UI elements together with a
border and optional padding. To learn more about card()
s, see this article.
card(
...,
full_screen = FALSE,
height = NULL,
max_height = NULL,
min_height = NULL,
fill = TRUE,
class = NULL,
wrapper = card_body
)
... |
Unnamed arguments can be any valid child of an htmltools tag (which includes card items such as |
full_screen |
If |
height |
Any valid CSS unit (e.g.,
|
max_height , min_height |
Any valid CSS unit (e.g.,
|
fill |
Whether or not to allow the card to grow/shrink to fit a
fillable container with an opinionated height (e.g., |
class |
Additional CSS classes for the returned UI element. |
wrapper |
A function (which returns a UI element) to call on unnamed
arguments in |
A htmltools::div()
tag.
card_body()
for putting stuff inside the card.
navset_card_tab()
for cards with multiple tabs.
layout_column_wrap()
for laying out multiple cards (or multiple
columns inside a card).
library(htmltools)
if (interactive()) {
card(
full_screen = TRUE,
card_header(
"This is the header"
),
card_body(
p("This is the body."),
p("This is still the body.")
),
card_footer(
"This is the footer"
)
)
}