Usage
Add<NuxtLoadingIndicator/> in your app.vue or layouts.
[app/app.vue]
Props
The color of the loading bar. It can be set to
false to turn off explicit color styling.The color of the loading bar when
error is set to true.Height of the loading bar, in pixels.
Duration of the loading bar, in milliseconds.
Throttle the appearing and hiding, in milliseconds.
By default Nuxt will back off as it approaches 100%. You can provide a custom function to customize the progress estimation, which is a function that receives the duration of the loading bar (above) and the elapsed time. It should return a value between 0 and 100.
Slots
You can pass custom HTML or components through the loading indicator’s default slot.This component is optional. To achieve full customization, you can implement your own one based on its source code.
You can hook into the underlying indicator instance using the
useLoadingIndicator composable, which will allow you to trigger start/finish events yourself.