motiondivision / motiondivision/motion
Slow spring animation is cut off after a while
Nobody has claimed this yet.
- 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
};
- Click one of the blue squares
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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