bs_img: Create HTML img tag configured with Bootstrap classes

View source: R/bsTools2.R

bs_imgR 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"
)
)

bsTools documentation built on Aug. 30, 2022, 1:08 a.m.

Related to bs_img in bsTools...