Nuxt/docs/content/3.api/2.components/4.nuxt-loading-indicator.md
Yaël Guilloux dc47c64f14
docs: use nuxt 3 and website theme (#5479)
Co-authored-by: Daniel Roe <daniel@roe.dev>
Co-authored-by: Sébastien Chopin <seb@nuxtjs.com>
Co-authored-by: Pooya Parsa <pooya@pi0.io>
Co-authored-by: pooya parsa <pyapar@gmail.com>
Co-authored-by: Clément Ollivier <clement.o2p@gmail.com>
2022-10-06 11:15:30 +02:00

1.0 KiB

<NuxtLoadingIndicator>

The <NuxtLoadingIndicator> component displays a progress bar on page navigation.

Examples

Basic Usage

Add <NuxtLoadingIndicator/> in your app.vue or layouts.

<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. ::