bs_img {bsTools}R Documentation

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

bs_img(
src = tempfile()
)

[Package bsTools version 0.1.0 Index]