Progress Bar
The ProgressBar plugin creates a progress bar and/or text indicator that updates as users navigate through the survey pages.
Basic Usage
Parameters
The total number of pages in the survey.
The initial current page (usually left at -1 for automatic handling).
Whether to include a text representation of progress.
Whether to include a visual progress bar.
Whether to display progress as a percentage (true) or as “Page X of Y” (false).
Custom styles to apply to the progress bar. Available keys are:
root
container
bar
text
Styling
The ProgressBar plugin uses the following default styles:
Methods
The ProgressBar plugin inherits methods from the base Plugin class and implements some specific methods:
Update both the progress bar and progress text.
Update only the visual progress bar.
Update only the progress text.
Remove the progress bar from the DOM.
Lifecycle Hooks
The ProgressBar plugin uses the following lifecycle hooks:
Set up the progress bar in the DOM when the plugin is initialized.
Update the progress when a new page is about to be rendered.
Set the progress to 100% when the survey is about to finish.
Remove the progress bar from the DOM when the plugin is destroyed.
Example
Here’s an example of how to create a customized progress bar: