Coder Social home page Coder Social logo

Comments (7)

oyeanuj avatar oyeanuj commented on August 18, 2024

+1 for this. A use-case as an example: A page has a global navigation bar and another page sticky bar but need to show the page sticky bar as always on. On scroll-up, would like to have the global navigation bar show up as well - so essentially, two of the headers show up together, both being react-headroom components.

from react-headroom.

KyleAMathews avatar KyleAMathews commented on August 18, 2024

Would love it if one of you wanted to create an example page for the website. Just create a PR adding a component called multiple-headrooms.js with some examples in the pages directory (https://github.com/KyleAMathews/react-headroom/tree/master/website/pages) and I'll handle linking to it from the main page.

I haven't actually faced this particular use case before so if you're facing it, you'd be ideal to research out possibilities and then create the demo.

from react-headroom.

champeng avatar champeng commented on August 18, 2024

@KyleAMathews Actually, I am not able to achieve what I want to do with it. Basically, when I have two headroom components, they both get pinned to the top of the viewport. I am not able to find a configurable parameter which can say that pin headroom 1 to 0,0 while headroom 2 to 0,60, for example. Please let me know if there is any such configuration available or should I look towards doing that in the code itself?

from react-headroom.

KyleAMathews avatar KyleAMathews commented on August 18, 2024

@champeng you want to use the parent prop — https://github.com/KyleAMathews/react-headroom/search?utf8=%E2%9C%93&q=parent

from react-headroom.

KyleAMathews avatar KyleAMathews commented on August 18, 2024

oh actually nvm, that's different.

from react-headroom.

KyleAMathews avatar KyleAMathews commented on August 18, 2024

@champeng isn't pinStart what you want?

from react-headroom.

champeng avatar champeng commented on August 18, 2024

@KyleAMathews pinStart is used to when to pin the headroom on scroll event but it is not specifying where to pin.

from react-headroom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.