This library offers a collection of loading spinner Svelte components. The current stable version is `0.3.6`. It provides a variety of visual spinners, including `Jumper`, `BarLoader`, `Circle`, and `Wave`, each implemented as a standalone Svelte component. Updates are typically released as needed, responding to bug fixes or Svelte ecosystem changes, rather than on a fixed cadence. A key architectural aspect is that these are pure Svelte components, making them reactive and easily integrated into any Svelte application. They are designed to work seamlessly with SvelteKit, particularly demonstrating integration with the `$app/stores.navigating` store for handling page transitions. Each spinner component is highly customizable via common props such as `size`, `color`, `unit`, and `duration`. Specific spinners like `Circle2` and `Circle3` offer additional, unique props for fine-grained control over their appearance. The package includes TypeScript type definitions, providing full type safety for developers using TypeScript in their Svelte projects.
npm install svelte-loading-spinnersVerified import paths — ran on the pinned version, not inferred.
Demonstrates integrating `svelte-loading-spinners` for SvelteKit page navigation detection and manual task simulation, using `Jumper` and `Wave` components. This example should be placed in a SvelteKit `+layout.svelte` file.
Always refer to the 'List of available spinners' section in the package README or the component's TypeScript definitions to understand component-specific props and their usage.
For vanilla Svelte applications, manage spinner visibility using your own reactive state or integrate with your chosen router's lifecycle events. Ensure SvelteKit is properly set up if you intend to use `$app/stores.navigating`.
If you encounter issues where the spinners do not appear in production environments, consider reinstalling the package as a standard dependency: `npm install svelte-loading-spinners` or `yarn add svelte-loading-spinners`.
Ensure the package is correctly installed via `npm install svelte-loading-spinners` or `yarn add svelte-loading-spinners`. Double-check the import statement for typos: `import { ComponentName } from 'svelte-loading-spinners';`.Use a named import with curly braces for all components: `import { Jumper } from 'svelte-loading-spinners';`. Verify the component name is correctly capitalized.If using SvelteKit, ensure `import { navigating } from '$app/stores';` is present in your script. If not using SvelteKit, you cannot use `$navigating` and must manage spinner visibility using alternative methods (e.g., local component state).No dependency data recorded yet.