Skip to main content
Question

How to find nodes that use a text or colour style


Hi, I want to search and return nodes on the current page where it uses a given text or color style in any way i.e. as a background fill, stroke, text color or font.

AFAIK, I can use fillStyleId to check if a layer’s background is using a color style. In that case, what other node attributes can I use to check for stroke, font and the rest?

3 replies

tank666
  • 4854 replies
  • July 24, 2023

tank666
  • 4854 replies
  • July 24, 2023

The Figma Developers website has a search engine.
https://www.figma.com/plugin-docs/search/


James_Yang
Figmate
  • Figmate
  • 82 replies
  • July 24, 2023

If you already have a style, you can use the consumers property on the style: BaseStyle | Plugin API, which will give you all the nodes and the fields where the style is applied.


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