A Figma plugin for creating simple mathmatical expressions with local variables
- Create values based on simple mathmatical expressions
- Use other variables as values for an expression
- Reference variables from other groups
- Reference variables from other collections
- In a variable, update its description with an expression like so:
{{ 2 + 2 }} - In the menu bar, click on the plugin, and it will run through all your variables and update their values if an expression is set.
- To use other variables as values reference them like so:
{{ $base * 2 }}. This will take the value from the value with the namebase - To use nested variables simply use their name:
{{ $Font/Size/base * 2}}. This will take the valuebasefrom the groupSizeinside the groupFont - To use variables from other collections prepend the variable name with the collection name. Example: If you have a collection called
primitivesthen write it like so$primitives/Font/Size/base- this will get the variableFont/Size/baseinside theprimitivescollection
- Only Number variables at the moment
- Modes are isolated, so you can't use a variable value from another mode.
- Only simple operators are supported:
*,/,+,-
If you want to improve the plugin, then you are very welcome to create a PR
This will stay forever free and you are welcome to use this in personal and business use.
I don't have plans to make this plugin more advanced, so if you need more advanced features i would recommend you to check out the Dynamic Variables by @neelts.