Slick: Allow swiping/dragging up/down instead of left/right when in vertical mode.

Created on 19 Dec 2014  路  7Comments  路  Source: kenwheeler/slick

Most helpful comment

it would be nice to have one slider that could be used for both vertical and horizontal use cases. ie i have a responsive layout for a desktop and mobile app, and want to change the slider position/orientation based on screen orientation...

All 7 comments

additionally the scrollWheel doesn't seem to work in vertical mode

OK looking thru the issues, this comes up again and again and again but the author seems to have made a decision not to support vertical carousels.

https://github.com/kenwheeler/slick/issues/627
https://github.com/kenwheeler/slick/issues/654

If you really want to do it, go into the swipeMove method, and swap curX and curY.

this will keep coming up every week as it's a perfectly valid design approach, despite the dogma.

for mobile, vertical scrolling is the norm. it's pleasing to have "centerMode" or other carousel effects.

even for desktop i have a layout for a game where I don't ever want to use the OS scrollbars, and want to have a vertical side cards selector carousel (to control the main content area)
image

so i guess this is not the "last slider you'll ever need" since it only supports half the orientations :)

there are other forks with vertical scrolling:
https://github.com/kenwheeler/slick/issues/620#issuecomment-58445768

@kenwheeler: Really nice work! It would be nice to have vertical swipe with vertical slick. You said:

vertical swiping is for the browser

I get your point, but there are some exceptions. This game have no issues with vertical swiping/dragging (even on iPhone):
http://copycut.github.io/gems-swapper/
https://github.com/copycut/gems-swapper/
I want to use Slick as part of a game.

Can you (or someone else also with experience) please take a look at Gems Swapper and add the vertical swipe functionality to Slick? Maybe not as default, but as an option.

  • I have tried to do it by myself, but dragging is clunky and doesn't work all the time.
  • I also tried @dcsan suggestion "(...) go into the swipeMove method, and swap curX and curY." but swipe isn't reliable nor fluid. Gems Swapper swipe is way better.
  • I have also tried @dcsan commented patch (https://github.com/dekwilde/slick/commit/cd8e665a355a3e0bd1e7e1bced534304cdf8831e) with no luck.

@kenwheeler: Where can I make a donation?

@kenwheeler: Nevermind, I found https://iosscripts.com/iosslider-vertical/.

it would be nice to have one slider that could be used for both vertical and horizontal use cases. ie i have a responsive layout for a desktop and mobile app, and want to change the slider position/orientation based on screen orientation...

@grijos how are the iosscripts working for you? slick now seems to have a vertical option, although there's a pending threat that it might get taken out!

Was this page helpful?
0 / 5 - 0 ratings