Comments (7)
+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.
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.
@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.
@champeng you want to use the parent
prop — https://github.com/KyleAMathews/react-headroom/search?utf8=%E2%9C%93&q=parent
from react-headroom.
oh actually nvm, that's different.
from react-headroom.
@champeng isn't pinStart
what you want?
from react-headroom.
@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)
- Parent prop and ComponentWIllUnmount HOT 2
- Please add a Changelog.md or similar HOT 4
- not working HOT 1
- upTolerance not working HOT 4
- Possible reopen header when the mouse pointer covers the old header area. HOT 1
- Changing content of headroom
- Show hidden header on 'focus-within' HOT 1
- Override style
- × TypeError: Object.assign requires that input parameter not be null or undefined HOT 1
- Gatsby page jumps to top when scrolling down (caused by react-headroom)
- Financing
- Glitch in safari mobile HOT 9
- Safari scroll bouncing causes white space to appear HOT 18
- Surport umd module in CDN
- Manual 'reset' HOT 1
- How to change z-index HOT 1
- "onUnfix" is not a correct name.
- Error: You may need an appropriate loader to handle this file type... HOT 1
- Super expression must either be null or a function, not undefined HOT 2
- Headroom not working with Chakra UI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-headroom.