Comments (4)
Thanks for looking into Swiffy Slider.
The number of slides shown is controlled by the css variable --swiffy-slider-item-count
.
You can simply create whatever breakpoints you need and set the --swiffy-slider-item-count
to the amount of slides you think fits. I agree that the current breakpoints are not super nice on viewports between mobile and tablet.
Here is an example that decreased the number of slides at 768px (using 16 px base size) and again at 576px. Of course you can do whatever you want:
@media (max-width: 48rem) {
.slider-item-show4 .slider-container {
--swiffy-slider-item-count: 3;
}
}
@media (max-width: 36rem) {
.slider-item-show4 .slider-container {
--swiffy-slider-item-count: 2;
}
}
from swiffy-slider.
@eschiendorfer - thanks, and yes it is smooth!
The reason for being this smooth is that it uses a scrollable div and no JS at all to do the scroll/sliding.
This is also why the sensitivity cannot be changed because it is handled by your device.
So it will be exactly as sensitive as when you scroll down on a webpage on your phone and behave in the same manner. Users are used to how scrolling works on their phones and that it depends on how fast and how long they swipe the screen.
I am on iOS and it feels nice - with an 'aggressive' swipe it will slide 2 slides, but handled like I normally do will slide only one. This will of course differ from device to device.
from swiffy-slider.
@nicped I found this project just today and had the same question... Unbelievable how smooth this slider is and thanks for the fast answer! Works perfect ;)
The only thing left, that I haven't figured out yet: Is it possible to (force) move only one item? I noticed, that the touch sensitivity is very high on my mobile phone. Sometimes when I swip, it moves two position forward. In my use case this is not wanted, as I only display one item on mobile screens.
from swiffy-slider.
thanks for the fast answer and support
from swiffy-slider.
Related Issues (20)
- automatic and responsive indicators HOT 3
- Responsiveness for tablet(medium devices) HOT 1
- Move by more than one slide? HOT 1
- Issue with extension file HOT 4
- Adding animation to text content HOT 3
- Looping not working HOT 13
- Typescript and framework integration HOT 4
- Infinity scroll HOT 2
- Product Gallery with vertical Thumbnails and Zoom effect HOT 3
- Unminimized distribution lacks vendor specific selector properties HOT 1
- An issue here on small screen devices HOT 5
- Div Wrapper under slider-container HOT 1
- Lazy Loading Images HOT 1
- A few beginner questions HOT 3
- Dragging an dClick HOT 7
- How to import extensions as module? HOT 4
- Button next and previous not working in RTL HOT 15
- indicators on mobile device fail on Lighthouse check HOT 3
- More than 2 items on mobile HOT 1
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 swiffy-slider.