Description Public fields Methods
R6 Class for progress bar
elemID of the progress bar defined by bar()
startthe starting position for the progress bar
currentthe current state of the progress bar
minthe minimum value of the progress bar
maxThe maximum value of the progress bar
texttext formula that updates the aria-valuetext
new()Create a new progress bar
pbar$new(start = 0, min = 0, max = 7)
startthe starting progress
minthe minimum value of the progress bar
maxthe 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
)inputIda unique identifier for the progress bar
fillcolor used to style the progress bar
fixedIf TRUE, the progress bar will be fixed to the
top or bottom of the parent element
positionIf fixed = TRUE, then the argument position
can be used to fix the progress bar to the "top" or "bottom" of
the parent element.
yOffsetA CSS value used to adjust the y position of the progress bar relative to the parent element
textformula for updating the aria text
classnamesstring containing one or more css classes
increase()increase
Increase the progress bar by 1 another number
pbar$increase(by = 1)
bya number between the min and max values (default = 1)
decrease()decrease
Decrease the progress bar by 1 another number
pbar$decrease(by = 1)
byA 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)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.