Preloader

preloader-tw
loadingyourexperience.

Customize

1500
99
0
10

Props

NameTypeDefaultDescription
loadingbooleanfalseWhether the preloader is active
variant"stairs" | "percentage" | "circle" | "slide" | "curtain""stairs"Visual variant of the preloader animation
position"fixed" | "absolute""absolute"Position type of the preloader container
durationnumber2500Duration of the loading animation in milliseconds
loadingTextstring"Loading your next level experience"Loading text to display (for stairs and circle variants)
zIndexnumber50Z-index for the preloader
bgColorstringundefinedBackground color (overrides default)
textClassNamestring""CSS classes for the loading text
percentagePosition"center" | "bottom-left" | "top-left""center"Position of percentage counter (percentage variant only)
showPercentageSignbooleantrueShow percentage sign (percentage variant only)
percentageTextClassNamestring""CSS classes for percentage text (percentage variant only)
showProgressBarbooleantrueShow progress bar (percentage variant only)
progressBarPosition"top" | "bottom""bottom"Progress bar position (percentage variant only)
stairCountnumber10Number of stairs (stairs variant only)
stairsRevealFrom"left" | "right" | "center""left"Direction stairs reveal from (stairs variant only)
stairsRevealDirection"up" | "down""up"Direction stairs move when revealing (stairs variant only)
onComplete() => voidundefinedCallback function when loading completes
onLoadingStart() => voidundefinedCallback function when loading starts
onLoadingComplete() => voidundefinedCallback function when exit animation completes
respectReducedMotionbooleanfalseRespect prefers-reduced-motion system setting
reducedMotionFallback"fade" | "none""fade"Fallback behavior when reduced motion is preferred (fade or instant)
ariaLabelstring"Loading content"ARIA label for screen readers
ariaLive"polite" | "assertive" | "off""polite"ARIA live region politeness level
textFadeThresholdnumber99Progress threshold (0-100) when loading text starts fading out
backdropBlurnumber0Backdrop blur amount in pixels
customContent(progress: number) => ReactNodeundefinedCustom content render function that receives current progress (0-100)
classNamestring""Additional CSS classes for styling
childrenReactNodeundefinedContent to show after loading completes