Skip to main content
Solved

How can we use external style library like and figma


I want to use “figma-plugin-ds” library in my ui.html file I have tried to include it by link stylesheet like “build your first figma plugin” video, but is not working. Are there any other ways to do so?

Also, I want to use svg images and other images like jpg, png,etc from our assets folder without writing style in the same file.

Can you please give an example code or something like that which can help me too much?

@Gleb Can you please help with this?

Best answer by Gleb

You don’t need to host it somewhere else

View original

7 replies

Gleb
  • Power Member
  • 4706 replies
  • June 20, 2023

@Gleb But using bundler can we use any image from assets folder to in our ui.html file whether it is svg OR jpd OR png?


Gleb
  • Power Member
  • 4706 replies
  • June 20, 2023

SVG: you can inline them as regular text using bundlers
Raster images: you can turn small ones into Base64 (I think you can use a bundler for that too) but for large ones you’ll need to host them somewhere as your plugin will get huge pretty quick otherwise and the max size of all files in a plugin is 15MB.


@Gleb If I am using the JSX with the plugin then do i need to host the plugin some where else or just no need to do anything for publish?

Can we publish it as we doing normally plugin with ui.html file?


Gleb
  • Power Member
  • 4706 replies
  • June 22, 2023

This page should explain it all: Libraries and Bundling | Plugin API


@Gleb

No i have create plugin and using jsx and it working in local, and plugin working in figma desktop app.

But my question is when i want to publish plugin in community then I can publish that plugin with react from figma desktop app as we publishing the normal figma plugin?

Or we need to host this plugins anywhere else to publish?


Gleb
  • Power Member
  • 4706 replies
  • Answer
  • June 22, 2023

You don’t need to host it somewhere else


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings