Skip to main content
Solved

Can a Figma plugin access the currently selected Fill Styles?


Hey there, I’d like to create a plugin to allow me to quickly generate a new saved linear gradient fill style (or Paint Style) from two or more previously-saved solid fill styles. The user would be able to select one or more saved fill styles from the right sidebar like this:

then run my plugin and have a new saved style called something like “Fruit / 100-400” with a gradient between those two colors that they could now adjust.

However, I can’t seem to find any way to access those selected styles; they don’t appear to be available under figma.currentPage.selction as I would’ve expected.

Just thought I’d ask if this plugin is possible, or if there isn’t a way to directly access those selected styles via API. Cheers!

Best answer by tank666

Figma does not currently have an API for getting the selected styles in the properties panel.

View original
This topic has been closed for replies.

2 replies

tank666
  • 4873 replies
  • Answer
  • May 4, 2023

Figma does not currently have an API for getting the selected styles in the properties panel.


Okay no worries, thanks @tank666!


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