apal21 / nextjs-progressbar

A simple Next.js progressbar component using NProgress.
https://www.npmjs.com/package/nextjs-progressbar
MIT License
780 stars 61 forks source link

Show at bottom of screen instead of top #23

Closed dancherb closed 3 years ago

dancherb commented 3 years ago

Thanks for this package - is there an easy way to show the bar at the bottom of the screen instead of the top? Changing top:0 to e.g. bottom:3 didn't immediately work.

apal21 commented 3 years ago

Hey @dancherb, this thing is hardcoded in the CSS here. I think this is a very rare use case and I'm not sure whether to create a separate prop for this.

Let me know your thoughts. We can discuss on this further

dancherb commented 3 years ago

Hey @dancherb, this thing is hardcoded in the CSS here. I think this is a very rare use case and I'm not sure whether to create a separate prop for this.

Let me know your thoughts. We can discuss on this further

Thanks - do you have any idea why simply changing top:0 to e.g. bottom:3 doesn't immediately work?

apal21 commented 3 years ago

Can you share the sample code so that I can tell you what is going on?

apal21 commented 3 years ago

The other alternative could be, providing the parent element. If you check the documentation, you can pass parent in the configuration.

E.g.

<NextNprogress
  options={{ parent: '#loader-parent' }}
/>

You can make this parent fixed to the bottom using CSS. Let me know if this helps.