Nuxt/docs/3.api/1.components/5.nuxt-loading-indicator.md
Sébastien Chopin f26a801775
docs: update to new website (#23743)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
2023-10-18 12:59:43 +02:00

1.3 KiB

title description links
<NuxtLoadingIndicator> Display a progress bar between page navigations.
label icon to size
Source i-simple-icons-github https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/components/nuxt-loading-indicator.ts xs

Usage

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

<template>
  <NuxtLayout>
    <div>
      <NuxtLoadingIndicator /> <!-- here -->
      <NuxtPage />
    </div>
  </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 to false to turn off explicit color styling.
  • 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).

::callout This component is optional. :br To achieve full customization, you can implement your own one based on its source code. ::