Learn R Programming

bsTools (version 0.1.0)

bs_img: Create HTML img tag configured with Bootstrap classes

Description

Create HTML img tag configured with Bootstrap classes

Usage

bs_img(
  src,
  alt = NULL,
  fluid = TRUE,
  thumbnail = FALSE,
  rounded = FALSE,
  float_start = FALSE,
  float_end = FALSE,
  center = FALSE,
  custom_class = NULL
)

Arguments

src

A string, the value to pass to the "src" param of html5::img().

alt

A string, the value to pass to the "alt" param of html5::img().

fluid

TRUE/FALSE, if TRUE, adds the class "img-fluid".

thumbnail

TRUE/FALSE, if TRUE (and fluid is FALSE), adds the class "img-thumbnail".

rounded

TRUE/FALSE, if TRUE, adds the class "rounded".

float_start

TRUE/FALSE, if TRUE, adds the class "float-start".

float_end

TRUE/FALSE, if TRUE (and float_start is FALSE), adds the class "float-end".

center

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

custom_class

A string, a custom class to append to the img tag.

Value

A string of HTML.

Examples

Run this code
# NOT RUN {
bs_img(
src = tempfile()
)
# }

Run the code above in your browser using DataLab