bs_figure {bsTools}R 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"
)
)

[Package bsTools version 1.0.5 Index]