Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote SVG cannot be animated #6

Open
mashakos opened this issue May 25, 2024 · 1 comment
Open

remote SVG cannot be animated #6

mashakos opened this issue May 25, 2024 · 1 comment

Comments

@mashakos
Copy link

when using the following from the examples along with a dynamic seed value, the resultant svg does not animate

      <SVG
        src="https://cdn.svgporn.com/logos/react.svg"
        width={256}
        height="auto"
        title="React"
      />
@Bowen7
Copy link
Owner

Bowen7 commented May 26, 2024

react-inlinesvg only calls getElement when title or description changes:
https://github.com/gilbarbara/react-inlinesvg/blob/14ddfe33ead89c90a0c9b9727ec78455fdddf6ac/src/index.tsx#L199-L201

If you want to create an animated remote SVG, you might need to add a dynamic key to the SVG:

<SVG
  src="https://cdn.svgporn.com/logos/react.svg"
  width={256}
  height="auto"
  title="React"
  key={seed}
/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants