card_body | R Documentation |
Components designed to be provided as direct children of a card()
. For a
general overview of the card()
API, see the Cards article or the
other articles listed in the References section of the card()
documentation.
card_body(
...,
fillable = TRUE,
min_height = NULL,
max_height = NULL,
max_height_full_screen = max_height,
height = NULL,
padding = NULL,
gap = NULL,
fill = TRUE,
class = NULL
)
card_title(..., container = htmltools::h5)
card_header(..., class = NULL, container = htmltools::div)
card_footer(..., class = NULL)
card_image(
file,
...,
href = NULL,
border_radius = c("top", "bottom", "all", "none"),
mime_type = NULL,
class = NULL,
height = NULL,
fill = TRUE,
width = NULL,
container = card_body
)
as.card_item(x)
is.card_item(x)
... |
Unnamed arguments can be any valid child of an htmltools tag. Named arguments become HTML attributes on returned UI element. |
fillable |
Whether or not the card item should be a fillable (i.e. flexbox) container. |
min_height , max_height , max_height_full_screen |
Any valid CSS length unit. |
height |
Any valid CSS unit (e.g.,
|
padding |
Padding to use for the body. This can be a numeric vector (which will be interpreted as pixels) or a character vector with valid CSS lengths. The length can be between one and four. If one, then that value will be used for all four sides. If two, then the first value will be used for the top and bottom, while the second value will be used for left and right. If three, then the first will be used for top, the second will be left and right, and the third will be bottom. If four, then the values will be interpreted as top, right, bottom, and left respectively. |
gap |
A CSS length unit defining the
|
fill |
Whether to allow this element to grow/shrink to fit its |
class |
Additional CSS classes for the returned UI element. |
container |
a function to generate an HTML element to contain the image. |
file |
a file path pointing an image. The image will be base64 encoded
and provided to the |
href |
an optional URL to link to. |
border_radius |
where to apply |
mime_type |
the mime type of the |
width |
Any valid CSS unit (e.g., |
x |
an object to test (or coerce to) a card item. |
An htmltools::div()
tag.
card_body()
: A general container for the "main content" of a card()
.
card_title()
: Similar to card_header()
but without the border and background color.
card_header()
: A header (with border and background color) for the card()
. Typically appears before a card_body()
.
card_footer()
: A header (with border and background color) for the card()
. Typically appears after a card_body()
.
card_image()
: Include static (i.e., pre-generated) images.
as.card_item()
: Mark an object as a card item. This will prevent the
card()
from putting the object inside a wrapper
(i.e., a
card_body()
).
card()
creates a card component.
navset_card_tab()
, navset_card_pill()
and
navset_card_underline()
create cards with tabbed navigation.
layout_columns()
and layout_column_wrap()
help position multiple
cards into columns and rows and can also be used inside a card.
layout_sidebar()
adds a sidebar to a card when nested in card()
or card_body()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.