motiondivision / motiondivision/motion

[BUG] Unable to animate svg text elements

Open
#2,578 5 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

1. Read the FAQs 👇

Not included in the FAQ.

2. Describe the bug

Framer Motion is unable to animate svg text elements. It appears to push content into a children attribute instead of altering the contents of the text element.

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug

https://codesandbox.io/p/sandbox/framer-motion-animate-content-forked-j3y3qt?file=%2Fsrc%2FApp.tsx%3A20%2C11

4. Steps to reproduce

Steps to reproduce the behavior:

  1. Load the sandbox
  2. Notice the count does not animate
  3. Inspect the text element in dev tools
  4. Notice it has a children attribute that is updating

5. Expected behavior

The text should animate, just like in the doc'd demo https://codesandbox.io/p/sandbox/framer-motion-animate-content-bxx7lt?from-embed=

6. Video or screenshots

Just a static count, not much to show.

7. Environment details

Chrome 123.0.6312.46 / MacOS, reproable everywhere.

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 inspect how the SVG text element is rendered and animated in the Motion codebase. Confirm the reported children attribute behavior, then verify that the text content updates during animation as shown in the documented demo.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.