solid-route-progress

Navigation API

import { NavigationProgress } from 'solid-route-progress/navigation'

;<NavigationProgress />

It works without a router.

Every <Progress> prop, plus:

PropDefaultMeaning
filter(event) => boolean on the navigate event; false skips it
timeout10000safety net for navigations that never unload; 0 disables it
<NavigationProgress filter={(event) => event.navigationType !== 'replace'} />

When the bar completes

NavigationBar
intercepted by a routerholds until navigatesuccess / navigateerror
navigateerror with an AbortErrorfades out without reaching 100%
navigateerror, anything elsecompletes as an 'error'
plain pushState, nobody interceptingcommits before the first paint, so nothing shows
cross-documentholds until the page unloads
back from the bfcachefades out
hash change, download, data-sp-ignorenothing
canceled by another listenernothing

Each navigation holds the bar on its own.

Where the API is missing

Nothing is tracked; <NavigationProgress> renders an idle bar. solid-route-progress/router's cross-document tracking needs it too.

createNavigationProgress()

import { createProgress, Progress } from 'solid-route-progress'
import { createNavigationProgress } from 'solid-route-progress/navigation'

const progress = createProgress()
createNavigationProgress(progress, { timeout: 5000 })

<Progress controller={progress} />

@solidjs/router loads outside the Navigation API, so use solid-route-progress/router for it.