carousel: Carousel

carouselR Documentation

Description

Carousel element.

Usage

carousel(..., id = NULL, class = "", controls = FALSE, indicators = FALSE)

Arguments

...

Slides of the carousel, see carouselItem().

id

ID of carousel.

class

Additional class of the carousel.

controls

Whether to show control arrows.

indicators

Whether to show indicators.

Examples

library(shiny)

ui <- fluidPage(
  theme = bslib::bs_theme(version = 5L),
  carousel(
    indicators = TRUE,
    controls = TRUE,
    carouselItem(
      h5("Hello"),
      class = "bg-primary rounded p-4"
    ),
    carouselItem(
      h5("World"),
      class = "bg-info rounded p-4"
    )
  )
)

server <- \(input, output, session){
}

if(interactive())
 shinyApp(ui, server)


JohnCoene/bsutils documentation built on June 15, 2024, 3:21 a.m.