bs_figure: Create HTML figure tag configured with Bootstrap classes

View source: R/bsTools2.R

bs_figureR Documentation

Create HTML figure tag configured with Bootstrap classes

Description

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

Usage

bs_figure(
  figure_attr = c(class = "figure"),
  img_attr = c(src = "...", alt = "...", class = "figure-img img-fluid"),
  figcaption_attr = c(class = "figure-caption"),
  figcaption = NULL
)

Arguments

figure_attr

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

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.

figcaption_attr

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

figcaption

A string, gets passed to html5::figcaption.

Value

A string of HTML.

Examples

bs_figure(
img_attr = c(
"src" = "...",
"alt" = "...",
"class" = "figure-img img-fluid"
)
)

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

Related to bs_figure in bsTools...