metafizzy / metafizzy/flickity

Get visible elements currently in viewport without groupCells

Open
#638 10 comments 5 reactions 0 assignees View on GitHub
feature request
Dominant language
JavaScript
Stars
7.6k
Forks
593
PR merge metrics
No merged PRs in 30d

Description

Hi @desandro ,

don't know if it is supported in some way, but I wanted to ask help with a issue I'm trying to solve:

I have a carousel with multiple visible elements and wanted to **get the current visible elements**. in the flickity-viewport.

I can achieve this using **groupCells** and using the **.is-selected** class attached to the element in the group.

the problem is that I need the slider to move by one element at a time, and not, for example, in steps of 3 elements using the **groupCells** option.

**Test case:** https://codepen.io/anon/pen/oGLjqy

is there a way to do it in a simple way using your plugin's tools or have I to integrate it with something else?

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodePen test case and inspect Flickity's existing plugin tools for how selected or visible carousel elements are represented. The desired result is to identify the elements currently visible in the viewport while advancing one element at a time without using groupCells.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.