# NOT RUN {
library(shiny)
ui <- fluidPage(
use_waiter(), # dependencies
show_waiter_on_load(spin_fading_circles()), #<U+00A0>shows before anything else
actionButton("show", "Show loading for 5 seconds")
)
server <- function(input, output, session){
hide_waiter() #<U+00A0>will hide *on_load waiter
observeEvent(input$show, {
show_waiter(
tagList(
spin_fading_circles(),
"Loading ..."
)
)
Sys.sleep(3)
hide_waiter()
})
}
if(interactive()) shinyApp(ui, server)
## ------------------------------------------------
## Method `Waiter$new`
## ------------------------------------------------
# }
# NOT RUN {
Waiter$new()
# }
Run the code above in your browser using DataLab