Learn R Programming

waiter (version 0.1.3)

butler: Butler

Description

Programmatically show and hide loading bar.

Usage

use_butler()

show_butler()

hide_butler()

config_butler( thickness = 5, colors = list(`0` = "red", `.3` = "blue", `1` = "green"), shadow_blur = 5, shadow_color = "rgba(0, 0, 0, .5)" )

Arguments

thickness

Thickness of the bar.

colors

List of gradient color stops used to draw the progress bar.

shadow_blur

Shadow blur size.

shadow_color

Shadow color.

Functions

  • use_butler: butler dependencies to include anywhere in your UI but ideally at the top.

  • show_butler: Show a butler.

  • hide_butler: Hide butler.

  • config_butler: Configure the butler.

Class

Arguments passed to config_butler are passed to the initialisation method new.

  • Butler: initiatlise a Butler.

Examples

Run this code
# NOT RUN {
library(shiny)

ui <- fluidPage(
	use_butler(),
	br(),
	actionButton("show", "show butler"),
	actionButton("hide", "hide butler")
)

server <- function(input, output){

	observeEvent(input$show,{
		show_butler()
	})

	observeEvent(input$hide,{
		hide_butler()
	})

}

if(interactive()) shinyApp(ui, server)

# }

Run the code above in your browser using DataLab