Scroll down wherever to trigger card show

Hey, all is it possible to recreate this youtube behavior (video on attachment), so when we’re scrolling up, the youtube navbar on the top, it’s hiding, BUT when we scroll down wherever we do it, the youtube navbar shows up.

The video is here

or