useSpinners {standby} | R Documentation |
Single Element CSS Spinners
Description
A collection of loading spinners animated with CSS
Usage
useSpinners()
spinners(uiOutput, type = 1, color = "#0275d8")
Arguments
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. |
Value
None
Functions
-
useSpinners
: Dependencies to include in your UI. -
spinners
: Display loading animation.
Examples
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)
})
}
)
}
[Package standby version 0.1.0 Index]