Learn R Programming

bsTools (version 0.1.0)

bs_carousel: Create a Bootstrap carousel

Description

Create a Bootstrap carousel

Usage

bs_carousel(
  id,
  items = list(),
  carousel_class = "carousel slide",
  inner_class = "carousel-inner",
  item_class = "carousel-item",
  controls = TRUE
)

Arguments

id

A string, the id to use for the carousel div.

items

A list, entries should be HTML to display in the carousel.

carousel_class

A string, the class of the div wrapping the carousel content.

inner_class

A string, the class of the div wrapping the carousel items.

item_class

A string, the class of the div wrapping each carousel item.

controls

TRUE/FALSE, if TRUE, adds code to display arrows to click through the carousel.

Value

A string of HTML.

Examples

Run this code
# NOT RUN {
bs_carousel(
id = "c1",
items = list(
  h1("First slide"),
  h1("Second slide"),
  h1("Third Slide")
)
)
# }

Run the code above in your browser using DataLab