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

Infinite scroll design pattern idea/question #109

Open
andrew-ireland opened this issue Jan 27, 2023 · 4 comments
Open

Infinite scroll design pattern idea/question #109

andrew-ireland opened this issue Jan 27, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@andrew-ireland
Copy link

Hi πŸ‘‹, first of all, just wanted to say how impressed I am with Lenis generally β€” very keen to use it in some upcoming projects!

Hopefully a quick/easy question for you re: infinite looping (how I stumbled across lenis).

Long story short, I'm looking to pull off the following somewhat experimental pattern where I have an intro/landing section, and then an infinitely looping section after (but only when scrolling in a downwards direction). See the attached image for reference.

I've already built a demo of this concept using native scrolling which works beautifully in safari, but chrome browsers don't seem to handle the looping part as elegantly... which is what led me to look closely at VirtualScroll implementation for consistency.

My question to you; are there any existing methods within Lenis which could contain the infinite loop to a specific target? Alternatively, any pointers in the right direction if I were to achieve this by forking lenis would be amazing (though I don't expect it!)

PATTERN

@clementroche
Copy link
Member

Thank you for your message, unfortunatelly such feature doesn't exist yet. That's in fact very specific. We're planning to open lenis for plugins in some ways, we don't know how. So this kind of feature could be a plugin.

@andrew-ireland
Copy link
Author

Not surprised to hear that, but nice idea on the plug-in architecture (really like the lack of bloat in lenis by default). If there is a way to allow for a specific loop target within that future development plugin dev that would be cool, but I understand it's probably fairly niche.

Looks like I'll need to fork and attempt some reverse engineering of your infinite looping method when I have time. Thanks for your reply 🫑

@arzafran
Copy link
Contributor

arzafran commented Jan 28, 2023

hey @andrew-ireland, i’ve implemented something similar by creating a contained lenis component in our website, check it out here and how it’s used could be a shortcut for what you’re trying to do.

@clementroche clementroche reopened this Jan 28, 2023
@clementroche
Copy link
Member

i leave it open for potential plugin

@clementroche clementroche added the enhancement New feature or request label Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants