Open kirill-develops opened 2 years ago
noticed in the documentation the following styling is applied when the 'stickyness' is in effect:
position: fixed; top: 0; left: 0; width: <width that was before 'stickiness'>
I'm wondering if it's possible to provide a different
top
position to give theSticky
element some padding.
I know this was posted a while ago but a workaround I'm using is to create an invisible div element above the content with its height set to the padding I want.
So something like this:
<Sticky>
<div className="opacity-0 h-12"></div>
<div>content here...</div>
</Sticky>
noticed in the documentation the following styling is applied when the 'stickyness' is in effect:
I'm wondering if it's possible to provide a different
top
position to give theSticky
element some padding.One other question: I noticed there is the
hideOnBoudryHit
prop, is there a similardisableOnBoundryHit.
My bug is when theSticky
element reaches theboundryElement
, it continues past the boundary before refreshing back to the end of theboundryElement
, unlike when it reaches the start of theboundryElement
and has a hard stop in place. Noticed thehideOnBoundryHit
responds immediately at the end of theboundryElement
however I don't want it to disappear, instead to wait there for the user until they scroll back up.I also tried defining the parent section component that houses the
boundaryElement
asscrollElement
prop, however it made mySticky
element static without any movement. Not sure how to properly use this prop.Thanks again for a wonderful wrapper element!