Next.jsData Attributes (app dir)

Prevent progress

Prevent the progress bar from starting

You can prevent the progress bar from starting by adding the data-prevent-progress={true} attribute.

Usage

<Link href="/dashboard">
  <span>Dashboard</span>
  <span onClick={(e) => e.preventDefault()} data-prevent-progress={true}>
    preventDefault
  </span>
</Link>

Warning

This functionnality is only available for the app directory.

On this page