maxs15 / maxs15/react-native-modalbox

Swipe to close animation duration

Open
#150 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2.9k
Forks
496
PR merge metrics
No merged PRs in 30d

Description

I have a modal that has the swipeToClose prop set to true.

But I would like the behaviour to be a bit different, in two ways:

- The dismissal of the modal should not to take place until the user has lifted his finger
- The modal shouldn't close immediately, but with a duration like the opening animation.

I simply have:
swipeToClose={true}
swipeThreshold={height/2} // height from Dimensions.get('window')

Am I missing something to achieve what I want?

Contributor guide

No contributing guide indexed for this repository

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 locating the implementation of the swipeToClose and swipeThreshold props, then inspect how the modal handles the gesture release and dismissal animation. Confirm the desired behavior for dismissal after finger release and a configurable closing duration; done means both behaviors work without changing the existing opening animation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.