apal21 / nextjs-progressbar

A simple Next.js progressbar component using NProgress.

Home Page:https://www.npmjs.com/package/nextjs-progressbar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Show at bottom of screen instead of top

dancherb opened this issue · comments

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.

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

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?

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

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.