Skip to content

Headroom sets class unfixed when it reaches top(0) instead the same position it was. #109

Closed

Description

@rickyrauch

Hello,

I'm trying to implement Headroom on our website, and I think I've found a bug.

My result:
Headroom sets class unfixed when my scrolling reaches the top(0).

Expected result:
Headroom sets the class unfixed when same position it was. Right after <Header/>

Video:
https://cloudup.com/iziJ0UsfDin

My implementation is like this:

<Header/>
<Headroom><Nav/></Headroom>
<Content/>
<Footer/>

Thanks!

Activity

  1. changed the title [-]Hi[/-] [+]Headroom sets class unpinned when it reaches top(0) instead the same position it was.[/+] on Jun 21, 2017
  2. changed the title [-]Headroom sets class unpinned when it reaches top(0) instead the same position it was.[/-] [+]Headroom sets class unfixed when it reaches top(0) instead the same position it was.[/+] on Jun 21, 2017
  3. Fetz commented on Sep 19, 2017

    @Fetz

    Hi @rickyrauch,

    You need to set pinStart with the total height of

  4. thekevbot commented on Jun 8, 2018

    @thekevbot

    @rickyrauch I'm not sure examples of adding options to your <headroom> component isn't in the docs, but you need to set pinStart to the height of <Header/>. Let's say if the height is 100px, you'd use it like this:

    <Header/>
    <Headroom pinStart={100}><Nav/></Headroom>
    <Content/>
    <Footer/>
    
  5. KyleAMathews commented on Nov 12, 2026

    @KyleAMathews
    Owner

    Set pinStart to the height of the element above the header (here <Header/>). #215 documents this in the README. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions