mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
c95a48c632
Co-authored-by: Damian <48835293+DamianGlowala@users.noreply.github.com> Co-authored-by: Sébastien Chopin <seb@nuxtjs.com> Co-authored-by: Pooya Parsa <pooya@pi0.io>
35 lines
1.1 KiB
Markdown
35 lines
1.1 KiB
Markdown
# `<NuxtLoadingIndicator>`
|
|
|
|
::ReadMore{link="/guide/features/routing"}
|
|
::
|
|
|
|
Nuxt provides `<NuxtLoadingIndicator>` to display a progress bar on page navigation.
|
|
|
|
## Examples
|
|
|
|
### Basic usage
|
|
|
|
Add `<NuxtLoadingIndicator/>` in your `app.vue` or layouts.
|
|
|
|
```vue [app.vue]
|
|
<template>
|
|
<NuxtLayout>
|
|
<NuxtLoadingIndicator /> <!-- here -->
|
|
<NuxtPage />
|
|
<NuxtLayout>
|
|
</template>
|
|
```
|
|
|
|
:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/framework/tree/main/examples/routing/pages?terminal=dev&file=/app.vue" blank}
|
|
|
|
## Props
|
|
|
|
- **color**: The color of the loading bar.
|
|
- **height**: Height of the loading bar, in pixels (default `3`).
|
|
- **duration**: Duration of the loading bar, in milliseconds (default `2000`).
|
|
- **throttle**: Throttle the appearing and hiding, in milliseconds (default `200`).
|
|
|
|
::alert{type=info icon=🔎}
|
|
This component is completely optional. To achieve full customization, you can implement your own one based on [this file](https://github.com/nuxt/framework/blob/main/packages/nuxt/src/app/components/nuxt-loading-bar.ts).
|
|
::
|