andreincu / styler

Styler is a Figma plugin that provides a more efficient way to build and maintain design systems.
https://www.figma.com/community/plugin/820660579767995949/Styler
MIT License
58 stars 9 forks source link
figma figma-plugin figma-styles

cover

Styler

This is a plugin for Figma that generates styles based on selected layers.
Basically, you can control your styles by changing layer properties and updating the styles.

Features

Extract Styles

Creates layers based on local styles.
This can be useful to transfer style from a project to another, or for libraries that already have styles created, but needs to make bulk changes.

Extract Styles will generate layers in the current page starting at position 0. (you'll be zoomed at the created layers)

Generate Styles

Is a multi-purpose action for creating, renaming or updating styles based on layer properties.

Apply Styles

Currently, this action apply the styles based only on layer name and local styles found.

Detach Styles

Works on selected layers.

Remove Styles

Customize plugin

Known issues

  1. Some of the Type details of the text layers are not saved into the style. This is also a limitation of the API... 😭
    [Fixed] 1. While trying to rename the styles using underscore _ or point . prefixes, the style will not change the publish status (it will not become unpublish). This is a limitation of the API. ☹️
    [WIP] After you create styles, you cannot reorder them using Figma API. 😔

Notes

  1. Any change can be Undo.
  2. Try to avoid same name for multiple layers. It will create a single style, but it will update its properties.
  3. Only Local Styles are supported. Still... You can use external styles to update local ones.
  4. There is no support for Groups and I don't plan to support it.
  5. For text layers, styler gets only the text properties by default, but now is possible to get other properties by adding + as prefix to the layer name.

Pairing well with

  1. Themer
  2. Match fills to local styles

Many thanks to Cristi Nica for support.
Inspired by Sketch Style Generator made by Luca Orio.