View source: R/three-dots-handler.R
useThreeDots | R Documentation |
Single element CSS loading animation.
useThreeDots()
threeDots(uiOutput, type = "elastic", color = "#9880ff")
uiOutput |
An output element to be wrapped within a loader. |
type |
The type of animation to use. Visit https://nzbin.github.io/three-dots/ for details. |
color |
The color of the loader. Choose between hexadecimal, RGB or keyword values. |
None
useThreeDots
: Dependencies to include in your UI.
threeDots
: Display loading animation.
if (interactive()) {
library(shiny)
shinyApp(
ui = fluidPage(
useThreeDots(),
actionButton("render", "Render"),
threeDots(plotOutput("plot"))
),
server = function(input, output) {
output$plot <- renderPlot({
input$render
Sys.sleep(3)
hist(mtcars$mpg)
})
}
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.