rstacruz / nprogress

For slim progress bars like on YouTube, Medium, etc
http://ricostacruz.com/nprogress
MIT License
25.98k stars 1.81k forks source link

Curious if possible to add a custom animation to the progress bar? #204

Open nicer00ster opened 6 years ago

nicer00ster commented 6 years ago

Hey! I've been interested in trying to add a particle-effect-like animation to my loading bar with using NProgress. Sort of like wow-mode while using hyper how random colors shoot everywhere. (This is the closest thing I can relate to https://codepen.io/thebabydino/pen/vgXrZm). I was curious if it was possible to do this? I've been trying to work on it myself but I'm sort of clueless as to where to start? Any suggestions would be awesome! 🙇

nicer00ster commented 6 years ago

Tried to make get it as close as possible to what I'm trying to do.... https://codepen.io/nicer00ster/pen/YvaQRj?editors=1100

nidilasi commented 5 years ago

You can override the CSS for example like:

#nprogress .bar {
        top: 109px!important;
    }
#nprogress .spinner {
        top: 120px!important;
}

.peg {
        // replace this with your animation
        transform: rotate(0deg) translate(0px, -0px)!important;
 }