bs_img {bsTools}R Documentation

Create HTML img tag configured with Bootstrap classes

Description

Learn more at https://getbootstrap.com/docs/5.1/content/images/.

Usage

bs_img(img_attr = c(src = "...", alt = "...", class = "img"), center = FALSE)

Arguments

img_attr

A named list or named vector, names are attribute names and values are attribute values. Passed to the attr parameter of html5::img.

center

TRUE/FALSE, if TRUE, wraps img tag in a div with class "text-center".

Value

A string of HTML.

Examples

bs_img(
img_attr = c(
"src" = "...",
"alt" = "...",
"class" = "img"
)
)

[Package bsTools version 1.0.5 Index]