Description Usage Arguments Value Examples
Create a progress bar to provide feedback on calculation.
1 2 |
id |
An id used to update the progress bar. |
value |
Value of the progress bar between 0 and 100, if >100 you must provide total. |
total |
Used to calculate percentage if value > 100, force an indicator to appear on top right of the progress bar. |
display_pct |
logical, display percentage on the progress bar. |
size |
Size, ‘NULL' by default or a value in ’xxs', 'xs', 'sm', only work with package 'shinydashboard'. |
status |
Color, must be a valid Bootstrap status : primary, info, success, warning, danger. |
striped |
logical, add a striped effect. |
title |
character, optional title. |
A progress bar that can be added to a UI definition.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
if (interactive()) {
library("shiny")
library("shinyWidgets")
ui <- fluidPage(
tags$b("Default"), br(),
progressBar(id = "pb1", value = 50),
sliderInput(inputId = "up1", label = "Update", min = 0, max = 100, value = 50)
)
server <- function(input, output, session) {
observeEvent(input$up1, {
updateProgressBar(session = session, id = "pb1", value = input$up1)
})
}
shinyApp(ui = ui, server = server)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.