Glide: Make it easier to navigate by direction to next/prev "page"

Created on 1 Aug 2018  路  3Comments  路  Source: glidejs/glide

There is currently no way to navigate to the next "page" / visible set of slides except by manually specifying a ={i} direction. This is problematic for a few reasons:

  • Your templating engine needs to be aware of how many slides are showing and calculate the next page index to jump to that page
  • If your using responsive breakpoints, the number perView could change and you would have to wire up additional boilerplate code / events to calculate and update direction indexes / dots etc.

Next / Prev page direction suggestion

>| - Move to the next visible page (respects breakpoint settings)
<| - Move to prev visible page (respects breakpoint settings)

Where | essentially represents a "page" so >| means move forward to the next page. <| means move back a page.

This could be added as an optional module called "Pagination" which adds pagination based direction.

feature request

Most helpful comment

Hey, i went ahead and implemented the feature. See #327, lets hope it passes the contribution requirements ;)

All 3 comments

Currently, glide does not support grouped slides movement.

I like the idea about pagination and the new direction "pattern". Gonna mark this feature request.

Thanks 馃挴

@jedrzejchalubek any news on this? It's pretty much the only thing stopping us from migrating away from Slick/Owl carousel.

Hey, i went ahead and implemented the feature. See #327, lets hope it passes the contribution requirements ;)

Was this page helpful?
0 / 5 - 0 ratings