What is a preloader?
A preloader is a UI layer that appears before the page is fully ready. It can help you: show a consistent loading state, reduce perceived waiting time, and avoid showing unfinished layout while assets are loading.
Component location
Files are located in src/components/effects/preloader.
Inside you’ll find:
- JS file with preloader logic.
- An HTML file that is auto-included into
<head>. - SCSS file for styling the preloader animation.
Enable the preloader
On pages where you need the preloader, pass settings to the page template via
locals. The component is controlled by two options:
enable and once.
...
"preloader": {
"enable": "true",
"once": "false"
},
...
preloader.enable— turns the component on/off for the page.preloader.once— iftrue, shows the preloader only once (first visit / first load).
"true"/"false") because they come from
HTML template locals.
Typical setups
Always show
Use this for pages that load a lot of media and should always show a loading state.
"preloader": { "enable": "true", "once": "false" }
Show once
Good for brand/intro preloaders: show only on the first load, then keep navigation fast.
"preloader": { "enable": "true", "once": "true" }
Download
Add a clean loading experience to media-heavy pages. Download the template and ship faster with ready-to-use components.