Animation: Hide/Show Navbar on Scroll

Here is how I’ve done it, tested and works on:

  • Desktop Chrome
  • iOS Safari
  • iOS Chrome
  1. Two variables, show-navbar for controlling whether nav is shown and scrollPos which holds previous scroll position

image

  1. Nav section set to Position: Normal, and ‘container’ set to Position: Fixed with Top binded to the screen below:

image
image

  1. Watch scroll position on Nav bar section

image

  1. On page scroll workflow

Note: As you can see I have additional condition that makes the navbar visible if the y is in the first 200px of the screen. This should eliminate loading changes

1 Like