busy_window_title: Create Busy Browser Title

Description Usage Arguments Value Note Examples

View source: R/title.R

Description

Change the text in the browser tab whenever the shiny application is processing any server-side code.

Usage

1
busy_window_title(title = "Running...")

Arguments

title

String to give the window title.

Value

The browser tab title will change whenever the shiny application is in a 'busy' state.

Note

Add use_shiny_title within the UI for busy_window_title to work.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
if (interactive()) {
  library(shiny)

  ui <- fluidPage(
    title = "Initial Title",
    use_shiny_title(),
    busy_window_title("Sleeping..."),
    actionButton("button", "Click me for a 5 second busy title")
  )

  server <- function(input, output, session) {
    observeEvent(input$button, Sys.sleep(5))
  }

  shinyApp(ui, server)
}

shinytitle documentation built on June 16, 2021, 5:08 p.m.