mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
1.5 KiB
1.5 KiB
title | description | links | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
<NuxtLoadingIndicator> | Display a progress bar between page navigations. |
|
Usage
Add <NuxtLoadingIndicator/>
in your app.vue
or layouts/
.
<template>
<NuxtLoadingIndicator />
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</template>
:link-example{to="/docs/examples/routing/pages"}
Slots
You can pass custom HTML or components through the loading indicator's default slot.
Props
color
: The color of the loading bar. It can be set tofalse
to turn off explicit color styling.height
: Height of the loading bar, in pixels (default3
).duration
: Duration of the loading bar, in milliseconds (default2000
).throttle
: Throttle the appearing and hiding, in milliseconds (default200
).
::callout This component is optional. :br To achieve full customization, you can implement your own one based on its source code. ::
::callout
You can hook into the underlying indicator instance using the useLoadingIndicator
composable, which will allow you to trigger start/finish events yourself.
::