UNPKG

sveltekit-top-loader

Version:

A SvelteKit top loading bar component made using nprogress.

65 lines (64 loc) 1.63 kB
interface Props { /** * Color for the top loader. * @default "#29d" */ color?: string; /** * The initial position for the top loader in percentage, 0.08 is 8%. * @default 0.08 */ minimum?: number; /** * The increament delay speed in milliseconds. * @default 200 */ trickleSpeed?: number; /** * The height for the top loader in pixels (px). * @default 3 */ height?: number; /** * Auto increamenting behaviour for the top loader. * @default true */ trickle?: boolean; /** * To show spinner or not. * @default true */ showSpinner?: boolean; /** * Animation settings using easing (a CSS easing string). * @default "ease" */ easing?: string; /** * Animation speed in ms for the top loader. * @default 200 */ speed?: number; /** * Defines a shadow for the top loader. * @default "0 0 10px ${color},0 0 5px ${color}" * * @ you can disable it by setting it to `false` */ shadow?: string | false; /** * Defines a template for the top loader. * @default "<div class="bar" role="bar"><div class="peg"></div></div> * <div class="spinner" role="spinner"><div class="spinner-icon"></div></div>" */ template?: string; /** * Defines zIndex for the top loader. * @default 1600 * */ zIndex?: number; } declare const SvelteKitTopLoader: import("svelte").Component<Props, {}, "">; type SvelteKitTopLoader = ReturnType<typeof SvelteKitTopLoader>; export default SvelteKitTopLoader;