Description Usage Arguments Details Examples
Programatically show and hide loading bars.
1 2 3 | useWaitress(color = "#697682", percent_color = "#333333")
use_waitress(color = "#697682", percent_color = "#333333")
|
color, percent_color |
Color of waitress and color of percent text shown when
|
You can pipe the methods with $
.
Waitress$new()
and call_waitress()
are equivalent.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(shiny)
ui <- fluidPage(
useWaitress("red"), # dependencies
sliderInput("set", "percentage", 1, 100, step = 5, value = 1)
)
server <- function(input, output, session){
w <- Waitress$
new()$ # call a waitress
start() # start waitress
observeEvent(input$set, {
w$set(input$set) # set at percentage
})
}
if(interactive()) shinyApp(ui, server)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.