carousel: Bootstrap 4 carousel

bs4CarouselR Documentation

Bootstrap 4 carousel

Description

carousel creates a carousel container to display media content.

carouselItem creates a carousel item to insert in a carousel

Usage

bs4Carousel(..., id, indicators = TRUE, width = 12, .list = NULL)

bs4CarouselItem(..., caption = NULL, active = FALSE)

carousel(..., id, indicators = TRUE, width = 12, .list = NULL)

carouselItem(..., caption = NULL, active = FALSE)

Arguments

...

Element such as images, iframe, ...

id

Unique carousel id.

indicators

Whether to display left and right indicators.

width

Carousel width. Between 1 and 12.

.list

Should you need to pass carouselItem via lapply or similar, put these item here instead of passing them in ...

caption

Item caption.

active

Whether the item is active or not at start.

Author(s)

David Granjon, dgranjon@ymail.com

See Also

Other boxWidgets: attachmentBlock(), bs4CardLabel(), bs4CardSidebar(), bs4SocialCard(), bs4Timeline(), cardDropdown(), cardProfile(), descriptionBlock(), userPost()

Examples

if(interactive()){
 library(shiny)
 library(bs4Dash)
 
 shinyApp(
   ui = dashboardPage(
     header = dashboardHeader(),
     sidebar = dashboardSidebar(),
     body = dashboardBody(
      carousel(
       id = "mycarousel",
       carouselItem(
        caption = "Item 1",
        tags$img(src = "https://via.placeholder.com/500")
       ),
       carouselItem(
        caption = "Item 2",
        tags$img(src = "https://via.placeholder.com/500")
       )
      )
     ),
     title = "Carousel"
   ),
   server = function(input, output) { }
 )
}


bs4Dash documentation built on Sept. 11, 2024, 8:46 p.m.