meliorence / meliorence/react-native-snap-carousel

How to make the carousel items touchable ?

Open
#462 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Is this a bug report, a feature request, or a question?

Question

Question details

I'd like to make the items clickable/touchable so that when touching one of them, the carousel snaps to that item.

I've tried to put a TouchableOpacity in each of my items. It works on Android but not on iOS. On iOS, the touchable "zones" are not located on their corresponding items.

I've also tried to make the entire carousel touchable but that prevents swiping within the carousel...

Note that in my case, I have a horizontal carousel with very few items, in loop mode and displaying alsways 3 items at once with the one in the middle being the active item.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the iOS touch behavior with a horizontal, looping carousel that displays three items, then inspect the carousel's touch and swipe handling. Done means tapping an item snaps to that item on iOS, while horizontal swiping continues to work and the touch zones match the visible items.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
frontend, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.