Learn more at https://getbootstrap.com/docs/5.1/components/card/.
bs_card(
header = NULL,
title = NULL,
text = NULL,
body,
footer = NULL,
img_src = NULL,
img_alt = NULL,
div_attr = c(class = "card"),
header_attr = c(class = "card-header"),
title_attr = c(class = "card-title"),
text_attr = c(class = "card-text"),
body_attr = c(class = "card-body"),
footer_attr = c(class = "card-footer"),
img_attr = c(class = "card-img-top"),
header_func = h5,
title_func = h5,
text_func = h5,
img_left = FALSE,
img_right = FALSE,
img_col_attr = c(class = "col-md-6"),
body_col_attr = c(class = "col-md-6"),
img_horizontal_attr = c(class = "img-fluid")
)
A string of HTML.
A string, the HTML to display in the header of the card.
A string, the HTML to display in the title of the card.
A string, the HTML to display in the text of the card.
A string, the HTML to display in the body of the card.
A string, the HTML to display in the footer of the card.
A string, the path of an image to display with the card. Passed to "src" attribute of the <img> tag.
A string, the alt attribute of an image to display with the card. Passed to "alt" attribute of the <img> tag.
A named list or named vector, names are attribute names and values are attribute values. Added to the div wrapping the card content.
A named list or named vector, names are attribute names and values are attribute values. Added to the card header.
A named list or named vector, names are attribute names and values are attribute values. Added to the card title.
A named list or named vector, names are attribute names and values are attribute values. Added to the card text.
A named list or named vector, names are attribute names and values are attribute values. Added to the div wrapping the card body.
A named list or named vector, names are attribute names and values are attribute values. Added to the div wrapping the card footer.
A named list or named vector, names are attribute names and values are attribute values. Added to the img tag if an image is to be displayed.
A html5 function to use for the header input.
A html5 function to use for the title input.
A html5 function to use for the text input.
TRUE/FALSE, if TRUE, places the image on the left of the card
TRUE/FALSE, if TRUE, places the image on the right of the card
A named list or named vector, names are attribute names and values are attribute values. Added to the column containing the img tag if an image is to be displayed horizontally.
A named list or named vector, names are attribute names and values are attribute values. Added to the column containing the body if an image is to be displayed horizontally.
A named list or named vector, names are attribute names and values are attribute values. Added to the img tag if an image is to be displayed horizontally.
bs_card(
body = "This is a card"
)
Run the code above in your browser using DataLab