figma-plugin
figma-plugin copied to clipboard
Introduce CubicBezier Token
Description
Add support for cubicBezier tokens. Properties+example: https://tr.designtokens.org/format/#cubic-bezier
Background
type: 'cubicBezier',
label: 'Cubic Bézier',
appliedToken: 'cubicBezier',
value: The value MUST be an array containing four numbers. These numbers represent two points (P1, P2) with one x coordinate and one y coordinate each [P1x, P1y, P2x, P2y]. The y coordinates of P1 and P2 can be any real number in the range [-∞, ∞], but the x coordinates are restricted to the range [0, 1].
Applying
Applying this token would influence the node.reactions[].action.transition.easing.easingFunctionCubicBezier property of all reactions. If there is no reaction on a layer, don't do anything.
Links to Figma API:
https://www.figma.com/plugin-docs/api/Reaction
https://www.figma.com/plugin-docs/api/FrameNode#reaction-prototyping-related-properties
https://www.figma.com/plugin-docs/api/Transition
https://tr.designtokens.org/format/#cubic-bezier