Exporting the Figma Design
Introduction
This guide explains how to set up the Figma® design and utilize the Microchip Graphics Suite (MGS) Composer Exporter to create an export archive that can be easily imported into MGS Composer.
The MGS Composer Exporter plug-in must be installed in Figma. Follow the steps in the previous section on how to install the plug-in.
The guide starts with an
in Figma that needs to be downloaded and imported into a Figma project.Figma Design
When imported and opened successfully in Figma, the design looks like the accompanying image.
At the top-most level, the example design consists of the following:
- 3 User Interface (UI) screens. Each screen is a frame that is the size of the screen design (WQVGA, 480x272).
- HomeScreen
- WifiScreen
- SetupScreen
- 4 Components, with instances used in the UI screens.
- imgHomeShared
- imgWifiShared
- imgSettingsShared
- imgWifiIconShared
For more information on how the Figma design is configured for MGS Composer Import, refer to the Figma Design Guidelines.
Exporting the Figma Design
To export an archive, in Figma go to Menu > Plugins > Manage Plugins.
In the Plugins & Widgets tab, search and click MGS Composer - Exporter.
Click Save to save the MGS Composer - Exporter plugin. Click Run to launch it.
Select Page 1 and then click Select Page.
In the Component Data screen, select 2 screens (SetupScreen, WifiScreen) to be imported to MGS Composer. You can select the screens in the Figma layers or check them in the MGS Composer Component Data window.
A couple of other options are shown in the plug-in window. If both options are checked, Flatten 'Group Components' will take higher priority during export.
Flatten ‘Group Components’ during export | This will flatten or merge all visible elements in a group into a single object. This is useful when using multiple vector paths or other visual objects to draw an image. Grouped components will be imported as an image widget on the MGS Composer screen with an image asset assigned to it. This is enabled by default. |
Export all primitives as .svg assets | This will export Figma vector paths, shapes, and other primitives such as SVGs. MGS Composer will try to convert these SVGs into image assets. All SVGs that share a parent frame or group will be flattened into a single image. This is useful for batch flattening for images. This is disabled by default. |
Keep the default options for now.
Click Generate Data to proceed.
The MGS Composer Exporter Plug-in Window will show the Figma components and generated JSON file that will be included in the export archive. Click Export to create the archive.
Save the export archive locally with File name: FigmaExport. Take note of the location of the archive since it will be imported to MGS Composer in the next section.
The archive is now ready to be imported into MGS Composer. Proceed to the next topic to learn about the import process.