Description Public fields Methods
R6 Class for progress bar
elem
ID of the progress bar defined by bar()
start
the starting position for the progress bar
current
the current state of the progress bar
min
the minimum value of the progress bar
max
The maximum value of the progress bar
text
text formula that updates the aria-valuetext
new()
Create a new progress bar
pbar$new(start = 0, min = 0, max = 7)
start
the starting progress
min
the minimum value of the progress bar
max
the maximum value of the progress bar
bar()
bar
Create a new progress bar in the shiny UI
pbar$bar( inputId, fill = NULL, fixed = FALSE, position = "top", yOffset = NULL, text = "{value} of {max}", classnames = NULL )
inputId
a unique identifier for the progress bar
fill
color used to style the progress bar
fixed
If TRUE
, the progress bar will be fixed to the
top or bottom of the parent element
position
If fixed = TRUE
, then the argument position
can be used to fix the progress bar to the "top" or "bottom" of
the parent element.
yOffset
A CSS value used to adjust the y position of the progress bar relative to the parent element
text
formula for updating the aria text
classnames
string containing one or more css classes
increase()
increase
Increase the progress bar by 1 another number
pbar$increase(by = 1)
by
a number between the min and max values (default = 1)
decrease()
decrease
Decrease the progress bar by 1 another number
pbar$decrease(by = 1)
by
A number between min and max values (default = 1)
reset()
reset
resets progress bar to its initial state
pbar$reset()
clone()
The objects of this class are cloneable with this method.
pbar$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.