useSpinners {standby} | R Documentation |
A collection of loading spinners animated with CSS
useSpinners()
spinners(uiOutput, type = 1, color = "#0275d8")
uiOutput |
An output element to be wrapped within a spinner. |
type |
Type of spinner to use. Any integer between |
color |
Color of the spinner. Choose between hexadecimal or keyword values. |
None
useSpinners
: Dependencies to include in your UI.
spinners
: Display loading animation.
if (interactive()) {
library(shiny)
shinyApp(
ui = fluidPage(
useSpinners(),
actionButton("render", "Render"),
spinners(plotOutput("plot"))
),
server = function(input, output) {
output$plot <- renderPlot({
input$render
Sys.sleep(3)
hist(mtcars$mpg)
})
}
)
}