Create a Bootstrap 4 progress bar.
Usage
bs4ProgressBar(
value,
min = 0,
max = 100,
vertical = FALSE,
striped = FALSE,
animated = FALSE,
status = "primary",
size = NULL,
label = NULL
)
bs4MultiProgressBar(
value,
min = 0,
max = 100,
vertical = FALSE,
striped = FALSE,
animated = FALSE,
status = "primary",
size = NULL,
label = NULL
)
progressBar(
value,
min = 0,
max = 100,
vertical = FALSE,
striped = FALSE,
animated = FALSE,
status = "primary",
size = NULL,
label = NULL
)
multiProgressBar(
value,
min = 0,
max = 100,
vertical = FALSE,
striped = FALSE,
animated = FALSE,
status = "primary",
size = NULL,
label = NULL
)
Arguments
- value
Progress bar value.
- min
Progress bar minimum value.
- max
Progress bar maximum value.
- vertical
Whether to display the progress bar in vertical mode. FALSE by default.
- striped
Whether the progress bar is striped or not. FALSE by default.
- animated
Whether to animate the progress bar. Default to FALSE.
- status
Progress bar status. Valid colors are defined as follows:
primary
: #007bff .secondary
: #6c757d .info
: #17a2b8 .success
: #28a745 .warning
: #ffc107 .danger
: #dc3545 .gray-dark
: #343a40 .gray
: #adb5bd .white
: #fff .indigo
: #6610f2 .lightblue
: #3c8dbc .navy
: #001f3f .purple
: #605ca8 .fuchsia
: #f012be .pink
: #e83e8c .maroon
: #d81b60 .orange
: #ff851b .lime
: #01ff70 .teal
: #39cccc .olive
: #3d9970 .
- size
Progress bar size. NULL, "sm", "xs" or "xxs".
- label
Progress label. NULL by default.
Details
For multiProgressBar()
, value
can be a vector which
corresponds to the progress for each segment within the progress bar.
If supplied, striped
, animated
, status
, and label
must be the
same length as value
or length 1, in which case vector recycling is
used.
Author
David Granjon, dgranjon@ymail.com
Examples
if(interactive()){
library(shiny)
library(bs4Dash)
shinyApp(
ui = dashboardPage(
header = dashboardHeader(),
sidebar = dashboardSidebar(),
body = dashboardBody(
box(
title = "Horizontal",
progressBar(
value = 10,
striped = TRUE,
animated = TRUE
),
progressBar(
value = 50,
status = "warning",
size = "xs"
),
progressBar(
value = 20,
status = "danger",
size = "sm"
),
multiProgressBar(
value = c(50, 20),
status = c("warning", "danger"),
size = "sm"
)
),
box(
title = "Vertical",
progressBar(
value = 10,
striped = TRUE,
animated = TRUE,
vertical = TRUE
),
progressBar(
value = 50,
status = "warning",
size = "xs",
vertical = TRUE
),
progressBar(
value = 20,
status = "danger",
size = "sm",
vertical = TRUE
),
multiProgressBar(
value = c(50, 20),
status = c("warning", "danger"),
size = "sm",
vertical = TRUE
)
)
),
title = "Progress bars"
),
server = function(input, output) { }
)
}