Skip to content
Calm motion: animations on this site only fade, with no movement

LoadingBar ​

Top-of-page progress via useLoadingBar()

The thin bar along the top edge that says "something is on its way" without blocking anything: for route changes and background requests. Mount <BlessLoadingBar /> once at the app root. Drive it from anywhere with useLoadingBar().

track(promise) is the usual call. start() / stop() count, so overlapping requests keep one bar up until the last one stops. A start() during the finish fade keeps it up. The bar trickles towards 90% on its own. set(p) shows real progress when you have it. With Vue Router:

ts
const bar = useLoadingBar();
router.beforeEach(() => bar.start());
router.afterEach(() => bar.stop());

Nuxt ships <NuxtLoadingIndicator> for the same job. Use that there. For a bar inside content with a known length, Progress. For "busy" on one element, Spinner or BlockUI.

Basic
watch the top edge of the page

Usage ​

ts
import { BlessLoadingBar } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
heightstring"3px"
position"bottom" | "top""top"
color"text" | "accent""accent"
labelstring"Loading"

Released under the MIT License. Character names and artwork belong to their owners.