Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dvlkit/nuxe/llms.txt
Use this file to discover all available pages before exploring further.
useLoadingIndicator returns a reactive state object for tracking the progress of page transitions. It drives Nuxe’s built-in <NuxeLoadingIndicator> component and is equally useful for building custom progress bars. The start() call is throttled so that instantaneous navigations never flash a half-complete bar, and finish() briefly holds progress at 100% before resetting — giving the user a satisfying sense of completion.
<NuxeLoadingIndicator> (exported from @dvlkit/nuxe) is a ready-to-use progress bar component that calls useLoadingIndicator internally and wires itself to Vue Router navigation events. Add it to your root layout and you get a top-of-page loading bar with zero configuration.Signature
Parameters
Optional configuration for the indicator’s timing behavior.
Milliseconds to wait after
start() is called before isLoading becomes true and the progress bar appears. Navigations that resolve within this window never show the indicator, preventing flicker on fast page loads.Controls how long (in milliseconds) the indicator remains at 100% after
finish() is called before it hides and resets. The actual hold time is duration / 4.Return Values
The current progress value, clamped to the range
0–100. Starts at 0, briefly jumps to 66 while loading, and reaches 100 when finish() is called.true from the moment the throttle delay has elapsed after start() until the hide timer fires after finish(). Use this to conditionally render or animate the progress bar element.Begins a loading sequence. Resets
progress to 0 immediately, then — after the throttle delay — sets isLoading to true and advances progress to 66. Calling start() while a sequence is already running cancels and restarts it.Completes the loading sequence. Sets
progress to 100 immediately, then after duration / 4 milliseconds resets both isLoading to false and progress to 0.Manually sets
progress to any value between 0 and 100 (clamped). Does not affect isLoading. Useful for showing deterministic progress when you know the total number of steps.