View source: R/spinkit-handler.R
useSpinkit | R Documentation |
Simple CSS spinners.
useSpinkit()
spinkit(uiOutput, type = "plane", color = "#333", size = "40px")
uiOutput |
An output element to be wrapped within a spinner. |
type |
Type of spinner to use. Valid values are:
|
color |
Color of the spinner. Defaults to |
size |
Size of the spinner. Defaults to |
None
useSpinkit
: Dependencies to include in your UI.
spinkit
: Display loading animation.
if (interactive()) {
library(shiny)
shinyApp(
ui = fluidPage(
useSpinkit(),
actionButton("render", "Render"),
spinkit(plotOutput("plot"), type = "circle-fade")
),
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.