1Mount NavigationProgress once in src/routes/+layout.svelte so it remains active across page changes.
2Navigation and top-level streamed promises returned from load are tracked automatically.
3Use waitFor for remote queries or other async work. For SSE, resolve it after the first meaningful event—the maxWaitTime safety limit prevents a stalled stream from holding the bar forever.
API reference
Prop
Type
Default
Description
position
top | bottom
top
Edge where the progress indicator is displayed.
maxProgress
number (1–99)
90
Highest progress value reached while navigation is still pending.
initialProgress
number
8
Progress value shown when navigation begins.
trickleInterval
number (milliseconds)
250
Delay between automatic progress increments in milliseconds.
transitionDuration
number (milliseconds)
200
Duration of progress and opacity transitions in milliseconds.
completionDelay
number (milliseconds)
180
Delay before hiding the completed bar in milliseconds.
minDisplayTime
number (milliseconds)
0
Minimum time the bar remains visible, including fast navigations.
waitFor
PromiseLike | () => PromiseLike
—
Additional promise to await before completing, such as a remote query or the first SSE event.
maxWaitTime
number (milliseconds)
30000
Safety timeout for streamed or explicit async work. Set to 0 to disable it.
height
number (pixels)
3
Thickness of the progress bar in pixels.
color
CSS color
shadcn primary
Overrides the primary CSS color.
zIndex
number
9999
CSS stacking level of the progress bar.
trackNavigation
boolean
true
Starts and completes from SvelteKit's client-side navigation lifecycle.
trackPageData
boolean
true
Waits for top-level promises streamed through the destination's page.data.
contained
boolean
false
Positions the bar inside its nearest positioned ancestor instead of the viewport.
value
number (0–100)
—
The current controlled value.
ariaLabel
string
Navigation progress
Accessible label announced for the progress indicator.
onStart
() => void
—
Called when tracked navigation begins.
onComplete
() => void
—
Called when the progress bar reaches completion.
class
string
—
Tailwind CSS classes applied to the component root.
indicatorClass
string
—
Tailwind CSS classes applied to the indicator.
Source
These files are included in the registry item and copied into the consuming project.