Search code examples
cssrshinyprogress

R Shiny Progress Box


I am working on a shiny app and have implemented my progress bar and modified it how it wanted using .progress, .progess-bar and .progress-text within my CSS. I have it nearly how I want, but I just need to get rid of the grey popup box with the x (see attached image).

Progress bar

I've tried a variety of different CSS combinations and have got nowhere. Does anyone know the CSS ID for this box?

Example:

ui:

ui <- shinyUI(fluidPage(

  includeCSS("www/styles.css"),

  plotOutput('plot', width = "300px", height = "300px"),

  actionButton('goPlot', 'Go plot')
))

server:

server <- function(input, output) {
output$plot <- renderPlot({
input$goPlot 

dat <- data.frame(x = numeric(0), y = numeric(0))

withProgress(message = 'Making plot', value = 0, {
  n <- 1000

  for (i in 1:n) {
    dat <- rbind(dat, data.frame(x = rnorm(1), y = rnorm(1)))

    incProgress(1/n, detail = paste("Doing part", i))

  }
})

plot(dat$x, dat$y)
})
}

css

.progress{
  position:fixed;
  bottom:50px;
  left:25%;
  width:50%;
}

.progress-bar{
  background-color:#000;
}

.progress-text{
  position:fixed;
  bottom:60px;
  left:25%;
  font-size:25px;
}

Solution

  • You can add this to your CSS, it will hide the notification:

    .shiny-notification{
      position:fixed;
      left:-100px;
      width:0px;
    }