---
layout: demo_layout.njk
---
## Progress Bar
This example shows how to implement a smoothly scrolling progress bar.
We start with an initial state with a button that issues a `POST` to `/start` to begin the job:
```html
Start Progress
```
This div is then replaced with a new div that reloads itself every 600ms:
```html
Running
```
This HTML is rerendered every 600 milliseconds, with the "width" style attribute on the progress bar being updated.
Because there is an id on the progress bar div, htmx will smoothly transition between requests by settling the
style attribute into its new value. This, when coupled with CSS transitions, make the visual transition continuous
rather than jumpy.
Finally, when the process is complete, a restart button is added to the UI (we are using the [`class-tools`](/extensions/class-tools)
extension in this example):
```html