{"id":16006481,"url":"https://github.com/svanboxel/figma-exporter","last_synced_at":"2026-04-26T23:31:40.808Z","repository":{"id":96249802,"uuid":"268359218","full_name":"SvanBoxel/figma-exporter","owner":"SvanBoxel","description":"NodeJS library that helps with exporting images from your Figma project.","archived":false,"fork":false,"pushed_at":"2023-07-12T20:06:58.000Z","size":25,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T02:14:47.137Z","etag":null,"topics":["exporter","figma"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/figma-exporter","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SvanBoxel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-31T20:31:45.000Z","updated_at":"2020-06-03T20:34:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"54a6a3ca-67df-46a2-bb64-058f92d94eea","html_url":"https://github.com/SvanBoxel/figma-exporter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/SvanBoxel/figma-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SvanBoxel%2Ffigma-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SvanBoxel%2Ffigma-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SvanBoxel%2Ffigma-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SvanBoxel%2Ffigma-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SvanBoxel","download_url":"https://codeload.github.com/SvanBoxel/figma-exporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SvanBoxel%2Ffigma-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32317163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exporter","figma"],"created_at":"2024-10-08T11:41:48.277Z","updated_at":"2026-04-26T23:31:40.571Z","avatar_url":"https://github.com/SvanBoxel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Figma Exporter\n![GitHub Actions Shield](https://github.com/SvanBoxel/figma-exporter/workflows/Build,%20lint,%20and%20test/badge.svg)\n[![npm version](http://img.shields.io/npm/v/figma-exporter.svg?style=flat)](https://www.npmjs.com/package/figma-exporter \"View this project on npm\")\n\n\u003e NodeJS library that helps with exporting Figma project. \n\n## Install\n\n```bash\nnpm i figma-exporter\n```\n\n## Usage\n1. Before you get started, [generate a Figma access token](https://www.figma.com/developers/api#access-tokens). This will be used to authenticate with the Figma API and get access to the files you want to export. \n\n2. You will also need your file id so the module knows which to run the export on.\n![figma file id](https://user-images.githubusercontent.com/24505883/83338620-6e8a4080-a2c6-11ea-8891-38b0a1f0c981.png)\n\n```js\nconst FigmaExporter = require('figma-exportor').default;\nconst client = new FigmaExporter(\"\u003cyour_figma_token\u003e\", \"\u003cfile_id\u003e\");\n```\n\n3. Then, declare the list of [Figma nodes](https://www.figma.com/plugin-docs/api/nodes/) in your project you want to export. The module accepts both node names and node ids and can handle `PAGE`, `CANVAS`, and `FRAME` types. The example below will collect information about 6 Figma nodes:\n\n```js\nconst filter = { \n    name: [\n      'Onboarding', \n      'Footer'\n    ],\n    id: [\n      '1:24',\n      '31:25',\n      '1:100',\n      '1:47'\n    ]\n};\n\nlet nodes = await client.collectNodes(filter)\n\n```\n\nThis outputs the following format: \n```js\n[\n  { id: '1:419', name: 'Onboarding', images: [] },\n  { id: '31:7299', name: 'Footer', images: [] },\n  { id: '1:24', name: 'Header', images: [] },\n  ...\n]\n```\n\n4. Then, you can request the image urls in a format of your liking. Supported formats are `jpg`, `png`, `svg` `pdf`;\n\n```js\nlet images = await client.getNodeImageUrls('png')\n```\n\nThis outputs the following format:\n\n```js\n[\n  {\n    id: '1:419',\n    name: 'Onboarding',\n    images: [{\n      imageUrl: '\u003curl\u003e',\n      imageFormat: 'png'\n    }]\n  },\n  {\n    id: '31:7299',\n    name: 'Footer',\n    images: [{\n      imageUrl: '\u003curl\u003e',\n      imageFormat: 'png'\n    }]\n  },\n  ...\n]\n```\n\n5. Finally, write the images and metadata (`data.json`) to a folder. The default folder for this is `./figma-export`.\n\n```js\nlet result = await client.writeImages('./data');\n```\n\nThis outputs the following format, which corresponds to the data that is written to `data.json`:\n\n```js\n[\n  {\n    id: '1:419',\n    name: 'Onboarding',\n    images: [{\n      imageUrl: '\u003curl\u003e',\n      imageFormat: 'png',\n      fileName: 'Onboarding.png'\n    }]\n  },\n  {\n    id: '31:7299',\n    name: 'Footer',\n    images: [{\n      imageUrl: '\u003curl\u003e',\n      imageFormat: 'png',\n      fileName: 'Footer.png'\n    }]\n  },\n  ...\n```\n\nFull example that export `Splashscreen` and `Contact` to both svg and pdf:\n```js\nconst FigmaExporter = require('figma-exportor').default\nconst client = new FigmaExporter(\"\u003cyour_figma_token\u003e\", \"\u003cfile_id\u003e\");\nconst filter = { \n    name: [\n        'Splashscreen',\n        'Contact' \n    ]\n}\nconst nodes = await client.collectNodes(filter);\nconst nodesWithImages = await client.getNodeImageUrls('svg');\nconst nodesWithImages = await client.getNodeImageUrls('pdf');\nconst result = await client.writeImages();\n\n```\n\n## Development\n\n## License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvanboxel%2Ffigma-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvanboxel%2Ffigma-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvanboxel%2Ffigma-exporter/lists"}