Streaming live at 10am (PST)

How do I integrate the pace.js Preloader in webflow

Hey People!

I want to use the pace.js preloader for my webflow site ( I read here in the forums that it should be possible - but I haven’t found exact information on how to use it within webflow.

Does anybody here know how I integrate it into my project? Which code-snippets do I need and where do I place them within my project? Or is it something I do after exporting the code?

Thanks for your help!

Hello @Holger_H,

I believe you need to use a CDN to link your website to the javascript:

You could implement the above link in your project custom code setting before the </body> tag like so:

<script src=""></script>

Then you need to choose one theme and link to the css file accordingly. You could implement the chosen css in your project custom code setting after the <head> tag like so:

<link rel="stylesheet" type="text/css" href="">

A full list of css theme is to be found here:

Hope that helps.

Hey @anthonysalamin

thanks a lot for the quick help :)! It works like this :pray:

Maybe two more questions regarding finetuning:

  • At the pace.js website it’s possible to change the color of the loading bar - you can download the script after chosing a color. Any idea where to place this script?
  • And: Right now the content of my page is already visible when the loading bar still moves. Any idea how to hide the websites content while the page is still loading?

Many thanks!


The script you are refering is only css.

If you wish to use those styles, I believe there is no need to implemenent the css style sheet like I previously suggested.

To implement your custom style, simply copy the code and wrap it within the <style> tag like so:

/* paste your css code below this line */

Also, it looks like pace need to be reffered as soon as possible to detect the loading progress.

You might want to try copy the javascript in the head as well. Your entire code would look like this right after the <head> tag:

 <script src="/pace/pace.js"></script>
 <link href="/pace/themes/pace-theme-barber-shop.css" rel="stylesheet" />

or if you wish to use custom css:

<script src="/pace/pace.js"></script>
/* pate your css code below this line */

replace the /pace/pace.js respectively /pace/themes/pace-theme-barber-shop.css by one of the CDN full path provided here

Hope that helps

1 Like

Hey @anthonysalamin!

yeah …thanks a lot! This really helped out.

For hiding the websites content till it has been loaded I found this script:

Pace.on("done", function(){

I just made a div above all my content and gave it the id “cover”. Now the div fades out when everything is loaded and the content becomes visible. That’s what I wanted.

Thanks again for your time! Huge help! :slight_smile:

1 Like