2022-07-07 17:59:55 +00:00
# `<NuxtLoadingIndicator>`
2022-10-06 09:15:30 +00:00
The `<NuxtLoadingIndicator>` component displays a progress bar on page navigation.
2022-07-07 17:59:55 +00:00
## Examples
2022-08-13 07:27:04 +00:00
### Basic Usage
2022-07-07 17:59:55 +00:00
Add `<NuxtLoadingIndicator/>` in your `app.vue` or layouts.
```vue [app.vue]
< template >
< NuxtLayout >
< NuxtLoadingIndicator / > <!-- here -->
< NuxtPage / >
2022-07-23 16:27:31 +00:00
< / NuxtLayout >
2022-07-07 17:59:55 +00:00
< / template >
```
:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/framework/tree/main/examples/routing/pages?terminal=dev& file=/app.vue" blank}
2022-11-16 14:06:36 +00:00
::alert{type=warning}
If you are changing layouts as well as page, the page transition you set here will not run. Instead, you should set a layout transition.
::
2022-10-10 10:12:36 +00:00
## Slots
You can pass custom HTML or components through the loading indicator's default slot.
2022-07-07 17:59:55 +00:00
## 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=🔎}
2022-07-07 19:35:47 +00:00
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-indicator.ts ).
2022-07-07 17:59:55 +00:00
::