How do I reveal the Navbar when scroll direction is up?

I have used the scroll-offset value to hide the navbar when scrolling but I think this should be swapped for scroll direction, then I could set it to reveal when scrolling up and hide when scrolling down. The problem is, I don’t know what I’m supposed to put in the code to get this working.

The browse component returns the Scroll Y direction - down is 1 and up is -1 so you can use this in your show/hide expressions.

And how do you fix the hidden on page load if there is no scrolling yet?

Can you explain what are you trying to achieve exactly? What conditions do you need / when should the navbar be shown or hidden?

You can tell im new to the program, I had it set to show when scroll direction is = -1 , but when page is loaded this value would be 0. I have now set it to: scroll direction <= 0 and this has fixed the problem.

Thank you for the help, im new to this program so im trying to learn all I can with no coding experience. Its a great program I have to say, its just understading the values that need to be used to perform the way you want it to.

1 Like

@Teodor - Think you could through a quick tutorial on making a navbar like this: