Skip to content
SVG code with unique links ids

SVG code with unique links ids

by Roman Dvoryanov

Plugin set unique ids for gradients and masks into the svg code. The problem appears when two or more svg icons with the same type of gradient put on one page.…

FreeFigma

Installs

1,903

Likes

36

Users

2,930

Views

4,692

Preview

SVG code with unique links ids preview

About this plugin

Plugin set unique ids for gradients and masks into the svg code.

The problem appears when two or more svg icons with the same type of gradient put on one page. The icons set the latest gradient from the svg files with two or more same ids.

GitHub: https://github.com/irodger/svg-id-randomizer

To solve the problem plugin adds 6 random numbers to ids inside the svg code links. This solution help to escape hand rewriting ids inside when you have the issue.

Without plugin:

...

...

...

With plugin:

...

...

...

How to use it?

Select what you need to export in svg, then run the plugin from the plugins menu. In the opened popup, you may see svg code (already with unique ids inside in case if the code has links to gradients).

Sad news, guys 🥺

Unfortunately, Figma didn't allow access to the export dialog for plugin development.

Also, viewers role can't use plugins 😢

More software development plugins

View all