Skip to content

Conversation

@pascalbaljet
Copy link
Member

This PR exposes the internal methods that we're using to drive the Progress indicator, giving developers control over the progress bar as well.

import { progress } from '@inertiajs/vue3'

progress.start()      // Begin progress animation
progress.set(0.25)    // Set to 25% complete
progress.finish()     // Complete and fade out
progress.reset()      // Reset to start
progress.remove()     // Complete and remove from DOM
progress.hide()       // Hide progress bar
progress.reveal()     // Show progress bar

progress.isStarted()  // Returns boolean
progress.getStatus()  // Returns current percentage or null

The hide() and reveal() methods use a counter system. This is used internally for prefetching.

progress.hide()    // hideCount = 1, bar hidden
progress.hide()    // hideCount = 2, bar still hidden
progress.reveal()  // hideCount = 1, bar still hidden
progress.reveal()  // hideCount = 0, bar shown

progress.reveal(true)  // Always shows regardless of hideCount

@pascalbaljet pascalbaljet merged commit 65c9063 into master Sep 24, 2025
12 checks passed
@pascalbaljet pascalbaljet deleted the progress branch September 24, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants