pbar: R6 Class for progress bar

Description Public fields Methods

Description

R6 Class for progress bar

Public fields

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

Methods

Public methods


Method new()

Create a new progress bar

Usage
pbar$new(start = 0, min = 0, max = 7)
Arguments
start

the starting progress

min

the minimum value of the progress bar

max

the maximum value of the progress bar


Method bar()

bar

Create a new progress bar in the shiny UI

Usage
pbar$bar(
  inputId,
  fill = NULL,
  fixed = FALSE,
  position = "top",
  yOffset = NULL,
  text = "{value} of {max}",
  classnames = NULL
)
Arguments
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


Method increase()

increase

Increase the progress bar by 1 another number

Usage
pbar$increase(by = 1)
Arguments
by

a number between the min and max values (default = 1)


Method decrease()

decrease

Decrease the progress bar by 1 another number

Usage
pbar$decrease(by = 1)
Arguments
by

A number between min and max values (default = 1)


Method reset()

reset

resets progress bar to its initial state

Usage
pbar$reset()

Method clone()

The objects of this class are cloneable with this method.

Usage
pbar$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


InControlofEffects/iceComponents documentation built on April 1, 2021, 5:51 a.m.