Resize widths of progress bars - Figma
✓ Published0🌍 Public
KKevinGutowski
Last edited Oct 13, 2021
Created on Oct 13, 2021
This example shows a Figma plugin script that resizes the segments of a selected progress bar to reflect a set of time intervals. The script uses the Figma API to access the current page selection, reads its padding and item spacing, and calculates new segment widths based on the proportional differences between sequential times in a hardcoded array. It clones the first child element, resizes each clone to the computed width, and appends the new parts to the selection, removing the original extra children first.
AI-generated description