motiondivision / motiondivision/motion
[BUG] Type bug with SVGTransformAttributes in AnimationSequence
Nobody has claimed this yet.
- 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
If I use an SVG-specific attribute from SVGTransformAttributes (like attrX) in an AnimationSequence, the code seems to run correctly, but I get a type error.
See CodeSandbox below for an example. But in short, the problem comes from code like:
const [scope, animate] = useAnimate();
...
animate([
[scope.current, { attrX: ...}, ...]
]);
There will be a type error at attrX.
3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
https://codesandbox.io/p/sandbox/framer-motion-animate-content-svg-text-forked-5nn53q
4. Steps to reproduce
See above CodeSandbox.
5. Expected behavior
There should not be a type error.
6. Video or screenshots
N/A
7. Environment details
N/A
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 with the AnimationSequence type definitions and the SVGTransformAttributes references, then reproduce the attrX error in the linked CodeSandbox. Done means the SVG-specific attrX property is accepted by TypeScript in an AnimationSequence without changing the runtime behavior.
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
- 48/100