Loading screens for Shiny; programmatically show and hide partial or full page loading screens with spinners or loading bars, see the demo and the cheat sheet.
Introduction by Veerle
The following staff members will help you keep your clients waiting:
Simply place autoWaiter
in your UI.
```r {highlight: [5]} library(shiny) library(waiter)
ui <- fluidPage( autoWaiter(), actionButton( "trigger", "Render" ), plotOutput("plot"), plotOutput("plot2") )
server <- function(input, output){ output$plot <- renderPlot({ input$trigger Sys.sleep(3) plot(cars) })
output$plot2 <- renderPlot({
input$trigger
Sys.sleep(5)
plot(runif(100))
})
}
shinyApp(ui, server)
## Installation
Install the stable version from
[CRAN](https://CRAN.R-project.org/package=waiter)
or development version from Github with `remotes` or
`devtools`.
<!-- tabs:start -->
#### **CRAN**
```r
install.packages("waiter")
install.packages("remotes")
remotes::install_github("JohnCoene/waiter")
install.packages("devtools")
devtools::install_github("JohnCoene/waiter")
You can learn how to build packages such as waiter with the book JavaScript for R
If you find this useful, please consider supporting waiter on Github, and do not hesitate to report any issue you may come across.
Please note that the 'waiter' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
The underlying CSS and JavaScript libraries that enable waiter:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.