examples/start-up-auto.R

# auto & GIF --------------------------------------------------------------

library(shiny)
library(shinybusy)

ui <- fluidPage(

  busy_start_up(
    loader = tags$img(
      src = "https://jeroen.github.io/images/banana.gif",
      width = 100
    ),
    text = "Loading...",
    mode = "auto"
  ),

  tags$h1("Ready to play!", class = "text-center"),
  plotOutput(outputId = "plot")

)

server <- function(input, output, session) {

  output$plot <- renderPlot({
    Sys.sleep(2)
    plot(rnorm(100))
  })

}

if (interactive())
  shinyApp(ui, server)
dreamRs/shinybusy documentation built on Sept. 22, 2024, 10 p.m.