Well, on medium’s and post there is a menu bar at the top which gets scrolled down when the user scrolls down the page but it gets back up once the user scrolls up. How can this effect be achieved?
For reference purpose here is a link to one the posts on medium:
Here the green menu bar at the top is not sticky but it appears whenever the user scrolls up the page.
When the user scrolls, update the custom state to the new Current Page Scroll Position.
Then, for the header bar, set a condition to say that when the Custom State’s value is less than (or within a certain # of pixels of) Current User’s scroll position, the element is visible.
Back of the napkin idea but that may lead you in the right direction. Report back on your findings