MCPcopy Index your code
hub / github.com/figma/plugin-samples / createCollection

Function createCollection

variables-import-export/code.js:3–7  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

1console.clear();
2
3function createCollection(name) {
4 const collection = figma.variables.createVariableCollection(name);
5 const modeId = collection.modes[0].modeId;
6 return { collection, modeId };
7}
8
9function createToken(collection, modeId, type, name, value) {
10 const token = figma.variables.createVariable(name, collection, type);

Callers 1

importJSONFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected