The progressbar widget is used to show the percentage complete for any arbitrary process. It's a simple and easy-to-use component with an extremely compact API, which provides excellent visual feedback to visitors.
In the current version of the component, the progressbar is purely determinate so we, or the system, must explicitly tell the widget the current amount of progress. An indeterminate progressbar is planned for a future release.
The widget is made up of just two nested <div>
elements—an outer container <div>
and an inner <div>
, which is used to highlight the current progress. The following screenshot shows a progressbar that is 50% complete:
We'll look at the following aspects of the widget during this chapter:
The default implementation
The single configurable option
The event API exposed by the widget
The unique method exposed by the progressbar
Some real-world examples