waitress {waiter}R Documentation

Waitress

Description

Programatically show and hide loading bars.

Usage

useWaitress(color = "#697682", percent_color = "#333333")

use_waitress(color = "#697682", percent_color = "#333333")

Arguments

color, percent_color

Color of waitress and color of percent text shown when theme is set to overlay-percent.

Details

You can pipe the methods with $. Waitress$new() and call_waitress() are equivalent.

Examples

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)
 

[Package waiter version 0.2.5 Index]