UIkit Progress Bar
UIkit Progress Bar– To create progress bar add class uk-progress to <progress> element.
UIkit Progress Bar Example
Syntax for Progress bar-
Syntax:
<progress class="uk-progress" value="" max=""></progress> |
Where value is progress bar value and max is the maximum allowed value for progress bar.
Example
Let us create a simple example using JavaScript.
Example:
<progress id="progressbar" class="uk-progress" value="5" max="100"></progress> <script> UIkit.util.ready(function () { var barObj = document.getElementById('progressbar'); var animate = setInterval(function () { barObj.value += 5; if (barObj.value >= barObj.max) { clearInterval(animate); } }, 1000); }); </script> |
If you run the above example it will produce output something like this-
Advertisements
Add Comment
📖 Read More
- 1. UIkit Spinner
- 2. UIkit Divider
- 3. UIkit Totop scroll
- 4. UIkit Tile
- 5. UIkit Notification
- 6. UIkit Tab