holy-loader
Version:
Holy Loader is a lightweight, customizable top-loading progress bar component for React applications.
71 lines (69 loc) • 2.28 kB
TypeScript
interface HolyLoaderProps {
/**
* Specifies the color of the top-loading bar.
* Default: "#59a2ff" (a shade of blue)
*/
color?: string;
/**
* Sets the initial position of the top-loading bar as a percentage of the total width.
* Default: 0.08 (8% of the total width)
*/
initialPosition?: number;
/**
* Specifies the height of the top-loading bar in either pixels (number) or css unit (string).
* Default: 4 pixels
*/
height?: number | string;
/**
* Specifies the easing function to use for the loading animation. Accepts any valid CSS easing string.
* Default: "ease"
*/
easing?: string;
/**
* Sets the animation speed of the top-loading bar in milliseconds.
* Default: 200 milliseconds
*/
speed?: number;
/**
* Defines the z-index property of the top-loading bar, controlling its stacking order.
* Default: 2147483647
*/
zIndex?: number;
/**
* Specifies the shadow effect to be applied to the top-loading bar.
* For example: "0 0 10px #59a2ff, 0 0 5px #59a2ff"
*/
boxShadow?: string;
/**
* Specifies whether to accompany the loading bar with a spinner.
* Default: false
*/
showSpinner?: boolean;
/**
* Specifies if search parameters should be ignored when evaluating
* whether to start the progress bar.
* Default: false
*/
ignoreSearchParams?: boolean;
/**
* Specifies the direction of the loading bar.
* Default: "ltr"
*/
dir?: 'ltr' | 'rtl';
}
/**
* Dispatches the event to manually start the HolyLoader progress bar.
*/
declare const startHolyLoader: () => void;
/**
* Dispatches the event to manually stop the HolyLoader progress bar.
*/
declare const stopHolyLoader: () => void;
/**
* HolyLoader is a React component that provides a customizable top-loading progress bar.
*
* @param {HolyLoaderProps} props The properties for configuring the HolyLoader.
* @returns {null}
*/
declare const HolyLoader: ({ color, initialPosition, height, easing, speed, zIndex, boxShadow, showSpinner, ignoreSearchParams, dir, }: HolyLoaderProps) => null;
export { type HolyLoaderProps, HolyLoader as default, startHolyLoader, stopHolyLoader };