You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 28, 2025. It is now read-only.
Thank you for an absolutely brilliant starting point! :-)
I love the simple, elegant approach you took with this - and decided to continue with some changes and features I needed in my own project:
Ported to TypeScript.
Touch/drag interactions improved and simplified.
Virtualized slides: only 4 slides are physically in the DOM at one time, so you effectively get lazy-loading of images, iframes, etc.
Seamless loop: the last slide appears to be located before the first.
Note that I also removed some features and all of the options - and added a simple, public API, so that the parent example gallery component can send commands using a ref.
The whole things is still somehow only 200 lines of code ;-)
I'll just post it here for you and others to enjoy:
Hi there,
Thank you for an absolutely brilliant starting point! :-)
I love the simple, elegant approach you took with this - and decided to continue with some changes and features I needed in my own project:
Note that I also removed some features and all of the options - and added a simple, public API, so that the parent example gallery component can send commands using a
ref.The whole things is still somehow only 200 lines of code ;-)
I'll just post it here for you and others to enjoy:
https://stackblitz.com/edit/react-slider-ttttt
Of course, feel free to use this under MIT, same as how you published it :-)
Thanks again!