motiondivision / motiondivision/motion

[BUG] LayoutId not working properly with element in transform parent

Open
#2,434 0 comments 3 reactions 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

1. Read the FAQs 👇

2. Describe the bug

LayoutId not working properly with element in transform parent

https://github.com/framer/motion/assets/70067449/6dfc891d-03db-4c35-9a37-a7f5e62fbad1

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug

https://codesandbox.io/p/github/Daydreamer-riri/drag-card-demo/main?import=true

4. Steps to reproduce

Steps to reproduce the behavior:
Follow the video and you'll see the error.

5. Expected behavior

When exiting, the element should return directly to its original position

6. Environment details

nextjs 14

### Tasks

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 with the linked CodeSandbox reproduction and the accompanying video, focusing on the LayoutId transition when the element is inside a transform parent. Reproduce the exit behavior in the Next.js 14 example; done means the element returns directly to its original position.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, react, typescript
Domain
frontend
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.