Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide Navbar until I scroll #156

Open
anesask opened this issue Nov 21, 2018 · 1 comment
Open

Hide Navbar until I scroll #156

anesask opened this issue Nov 21, 2018 · 1 comment

Comments

@anesask
Copy link

anesask commented Nov 21, 2018

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

@LynchZou
Copy link

You can do the following.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants