Please take a look above screenshot, there is a button, and a count appears when selecting the component.
Do you know if this default is from Figma?
Please take a look above screenshot, there is a button, and a count appears when selecting the component.
Do you know if this default is from Figma?
Best answer by tank666
I’m sorry but your code is not complete enough to test the functionality.
Here is a code snippet for creating components and combining them as variants.
let arr = [],
x = 0;
for (let i = 0; i < 8; i++) {
const component = figma.createComponent();
component.name = 'Value ' + (i + 1);
component.fills = [{
type: 'SOLID',
color: {
r: Math.random(),
g: Math.random(),
b: Math.random()
}
}];
if (i > 0) {
x += component.width + 20;
component.x = x
}
arr.push(component)
}
figma.combineAsVariants(arr, figma.currentPage)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.