[Feature Request] Use the new browser Navigation API to show a native loading indicator when navigating
#24553 opened on Dec 1, 2023
Description
Describe the feature
There is a new Navigation API for browsers which can trigger native browser loading indicator when navigating between SPA pages. This adds a nice native feel for SPA navigation. Currently Nuxt has the <NuxtLoadingIndicator /> component that shows the loading bar at the top but I think if we combine that with this native loading indicator feature we can really make great UX.
Yes, this is bleeding edge feature not currently supported everywhere but I think it would be nice to still give users the option to use this new feature IF their browser supports it.
Docs: https://developer.chrome.com/docs/web-platform/navigation-api/ https://developer.mozilla.org/en-US/docs/Web/API/Navigation_API
Demo: https://gigantic-honored-octagon.glitch.me/
(In the demo, you can activate the Add an artificial two-second delay to all navigations (should impact the loading spinner/scroll restoration/focus reset/accessibility announcements). checkbox to see the native loader appearing on the tab when navigating)
Additional information
- Would you be willing to help implement this feature?
- Could this feature be implemented as a module?
Final checks
- Read the contribution guide.
- Check existing discussions and issues.