Progress Bar: Page One
This page shows a custom progress bar based on an idea by @kb↗. It utilizes the swup progress bar plugin↗. Click on the link to page two a above this section to see it in action.
Install the 👜 Bag of Tricks ✨ in your astro project with npm install astro-vtbot
or install as an Astro integration!. Then use the <ProgressBar>
like this:
The <BrakePad />
component shown in the listing above is optional. It helps you to see the progress bar even if you have a fast server and a fast connection: It simulates long loading times for DEV mode. <BrakePad />
does nothing when you build for production.
As an alternative you could also throttle the connection speed using the browser’s dev tools.