/    Sign up×
Community /Pin to ProfileBookmark

Lightweight dragable content slider (carousel) with requirements

Hello,
just like the title i need a **lightweight slider** which offers me to **show 4 items** at a time.
With lightweight i mean that i dont want a solution with huge possibilities and thereby many dispensable code.
It needs to be **dragable for touch**.
Additional when dragging the items should **latch with a single item**. I saw some slider which shows always a group of 4 but i just want that the items stay in the “4 items view”-grid. **Infinite loop** is **not needed**.

Hope you can help me, thank you very much in advance.

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@SempervivumFeb 28.2021 — A solution based on scroll snapping would be very lightweight. Check if it's applicable for you.

https://css-tricks.com/practical-css-scroll-snapping/
Copy linkTweet thisAlerts:
@ChangeauthorFeb 28.2021 — @Sempervivum#1628710 Thank you very much for your reply. Looks good but seems to be unable for touch drag.
Copy linkTweet thisAlerts:
@SempervivumFeb 28.2021 — Hm, I found a test file I coded some time ago and it works fine on my mobile. How did you test it? Or do you require that it's working by dragging the mouse either?

https://webentwicklung.ulrichbangert.de/thread363-swipe-images-3.html
Copy linkTweet thisAlerts:
@SempervivumFeb 28.2021 — I checked

https://caniuse.com/?search=scroll-snap

and obviously browser support is not sufficient, no support in Safari and Firefox.
Copy linkTweet thisAlerts:
@rpg2009Feb 28.2021 — This is a lightweight and dependency free slider, that I have used recently. Maybe worth a look

[glidejs](https://glidejs.com/)
×

Success!

Help @Change spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 3.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,

tipper: Anonymous,
tipped: article
amount: 10 SATS,
)...