Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

figma-export-svg

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

figma-export-svg

This is a simple CLI tool to export SVGs from Figma. It uses the Figma API to fetch the SVGs and saves them to the local file system, then optionally optimizes them using SVGO.

  • 0.0.6
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
141
increased by14000%
Maintainers
0
Weekly downloads
 
Created
Source

Figma Export SVG

This is a simple CLI tool to export SVGs from Figma. It uses the Figma API to fetch the SVGs and saves them to the local file system, then optionally optimizes them using SVGO.

Installation

npm install -g figma-export-svg

Usage

figma-export-svg -a <access-token> -f <file-id> -n <node-ids (comma-separated)> -o <output-dir>

Options

  -a, --access-token <access-token>  Figma personal access token (https://www.figma.com/developers/api#access-tokens)
  -c, --clear-output-dir             Clear output directory before saving new SVGs
  -o, --output-dir <output-dir>      Output directory
  -f, --file-id <file-id>            Figma file ID, e.g., oQ5VCtq1r0KrPx3VpqMSX5
  -n, --node-ids <node-ids>          Figma node IDs (comma-separated), e.g., 5432:1234,1234:9876
  --file-name-strategy <strategy>    File name strategy: camel, pascal, pascalSnake, constant, kebab, snake, train. Default: kebab
  --svgo-config <value>              Path to SVGO config file (e.g., ./svgo.config.mjs)
  -h, --help                         display help for command
  
  # Figma API options (see: https://www.figma.com/developers/api#get-images-endpoint)
  --scale <value>                    Scale factor for the exported SVGs. Between 0.01 and 4.
  --outline-text                     Convert text to outlines if configured
  --include-id                       Whether to include id attributes for all SVG elements
  --include-node-id                  Whether to include node id attributes for all SVG elements
  --simplify-strokes                 Simplify strokes in the exported SVGs
  --contents-only                    Whether content that overlaps the node should be excluded from rendering
  --absolute-bounds                  Whether to use absolute bounding box for exported SVGs

FAQs

Package last updated on 04 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc