As of August 2024, Splade is no longer actively maintained. Though we will try to keep up with future Laravel and PHP versions, we discourage using Splade in new projects.

After a period of reflection, we've come full circle and decided to bring the magic of Splade back to Inertia, where it all started. Please check out this new chapter in our journey: Inertia UI.

Progress Bar

Splade's page loading capabilities are asynchronous, so you probably want to display a loading bar whenever it performs requests. You can enable it in the plugin options of the app.js file with the progress_bar key:

createApp({ render: renderSpladeApp({ el }) })
.use(SpladePlugin, {
'progress_bar': true,
})
.mount(el);

By default, the progress bar appears after a delay of 250 ms. Under the hood, it uses the NProgress library. You can customize the library and the default delay by passing an object instead of a boolean:

'progress_bar': {
delay: 250,
color: "#4B5563",
css: true,
spinner: false,
}