motiondivision / motiondivision/motion

Slow spring animation is cut off after a while

Open
#1,207 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
33.7k
Forks
1.4k
Avg merge
1d 10h
Merged PRs (30d)
14

Description

CodeSandbox reproduction of the bug
https://codesandbox.io/s/framer-motion-border-radius-layout-issue-forked-s4ymf?file=/src/Modal.tsx

Steps to reproduce
I am not 100% sure, but this does not seem like a smooth transition to me. Of course it could be because the config values are just too extreme, but it could also be a bug. This is the transition config:

const transition: Transition = {
  type: "spring",
  stiffness: 4,
  damping: 35,
  mass: 0.5
};
  1. Click one of the blue squares
  2. Midway during the animation, it suddenly accelerates to snap to the end

Expected behavior

The transition should keep an even pace until the end.

Video or screenshots

https://user-images.githubusercontent.com/159500/124361203-260e2680-dc2e-11eb-9cd1-05f5ef7fafea.mov

https://user-images.githubusercontent.com/159500/124361207-2ad2da80-dc2e-11eb-9511-2db4ff4f8523.mov

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 running the linked CodeSandbox reproduction and inspect src/Modal.tsx with the stated spring transition values. Reproduce the mid-animation acceleration, then trace the relevant motion behavior in the repository; done means the transition no longer snaps prematurely while preserving the reported reproduction.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.