Running plugin API code in the JavaScript console is the best Figma feature you've never used. Here's the code:
const [collection] = await figma.variables.getLocalVariableCollectionsAsync();
collection.variableIds.forEach(async function arrow(id) {
const variable = await figma.variables.getVariableByIdAsync(id);
variable.setVariableCodeSyntax(
"WEB",
`var(--color-${variable.name.replace(/\//g, "-").toLowerCase()})`
)
})
____________________________________________________
Find us on ⬇️
X (formerly Twitter): https://x.com/figma
Instagram: / figma
LinkedIn: / figma
TikTok: / figma
Figma forum: https://forum.figma.com/
Nesta página do site você pode assistir ao vídeo on-line Solving Problems with JavaScript: Variable Code Syntax | Figma duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Figma 06 Fevereiro 2025, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 14,229 vezes e gostou 563 espectadores. Boa visualização!