KyleAMathews/react-headroom

Hide Navbar until I scroll

Opened this issue · 1 comments

After managing show/hide navbar with Headroom, I'm very interested is it possible to hide Navbar until I scroll a page...
I tried it with CSS, but I didn't found the way it work.
Hope there is some easy solution to this... It would be great...
Thanks in advance

You can do the following.

...
this.state = {
    isDisplayNavbar: 'none'
}
...
<Headroom
    style={{ display: this.state.isDisplayNavbar }}
    onPin={() => this.setState({ display: 'block' })}
>
    {your content}
</Headroom>