bs_card | R Documentation |
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") )
header |
A string, the HTML to display in the header of the card. |
title |
A string, the HTML to display in the title of the card. |
text |
A string, the HTML to display in the text of the card. |
body |
A string, the HTML to display in the body of the card. |
footer |
A string, the HTML to display in the footer of the card. |
img_src |
A string, the path of an image to display with the card. Passed to "src" attribute of the <img> tag. |
img_alt |
A string, the alt attribute of an image to display with the card. Passed to "alt" attribute of the <img> tag. |
div_attr |
A named list or named vector, names are attribute names and values are attribute values. Added to the div wrapping the card content. |
header_attr |
A named list or named vector, names are attribute names and values are attribute values. Added to the card header. |
title_attr |
A named list or named vector, names are attribute names and values are attribute values. Added to the card title. |
text_attr |
A named list or named vector, names are attribute names and values are attribute values. Added to the card text. |
body_attr |
A named list or named vector, names are attribute names and values are attribute values. Added to the div wrapping the card body. |
footer_attr |
A named list or named vector, names are attribute names and values are attribute values. Added to the div wrapping the card footer. |
img_attr |
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. |
header_func |
A html5 function to use for the header input. |
title_func |
A html5 function to use for the title input. |
text_func |
A html5 function to use for the text input. |
img_left |
TRUE/FALSE, if TRUE, places the image on the left of the card |
img_right |
TRUE/FALSE, if TRUE, places the image on the right of the card |
img_col_attr |
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. |
body_col_attr |
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. |
img_horizontal_attr |
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. |
A string of HTML.
bs_card( body = "This is a card" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.