Simple way to export a Figma components by name:ok_hand:
figma-portal
is your choice:
- If you use and strictly adhere to the naming policy in component library
- Explaining to the designer where to get the
nodeId
, teamId
or fileKey
is too difficult
Install
npm install figma-portal --save-dev
Usage
figma-portal extract -d DEFAULT_OUTPUT_DIR -p PROJECT_NAME -c .figma.yml
Environment variables
FIGMA_TOKEN
- Personal or OAuth tokenFIGMA_TEAM_ID
- Id of the team to list projects from
Configuration
Create a config file - .figma.yml
, and add a new description for the exported components:
- name: GitHub / Figma portal / Logo
outputDir: media
fileName: banner
format: svg
scale: 1
API
Read the API documentation for more information.