captivationsoftware/react-sticky

Is there a way to have a sticky footer?

NicoleRauch opened this issue ยท 1 comments

I'm submitting a ...

  • bug report
  • feature request / request for help
  • support request

What is the current behavior?

I would like to have a sticky footer. But I don't know how / whether react-sticky can do this.

What is the expected or desired behavior?

It should be the same as "basic", just upside-down :-)
I.e. the sticky footer should stick to the bottom until the StickyContainer is scrolled up so far that its bottom moves into the viewport. Then the sticky footer should scroll with the StickyContainer to reveal the stuff underneath the StickyContainer.

Why do you want this? What use case do you have?

I want to build a long order summary page which should have a button "Buy this!" at the bottom of the page that should be always visible (aka. "sticky"). Below the button there is a general footer that should become visible if the user scrolls all the way down (then the button area should lose its stickiness and move upwards with the rest of the page).

What is your environment?

  • Version:
  • Browser: all sorts, IE9 upwards.

Is there anything else I should know?

vcarl commented

Not currently supported, sorry! It's been asked about before, but isn't currently planned to be implemented. I was poking around the innards of the library a couple weeks ago to try and make it a little simpler and more robust, if I can get that wrapped up I'll see how much it would take to get a footer working.