carousel | R Documentation |
Carousel element.
carousel(..., id = NULL, class = "", controls = FALSE, indicators = FALSE)
... |
Slides of the carousel, see |
id |
ID of carousel. |
class |
Additional class of the carousel. |
controls |
Whether to show control arrows. |
indicators |
Whether to show indicators. |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.