Figma
Smart Importer can import Figma data. This page explains how to to import Figma data with Smart Importer and how to work with the results.
Please note that you cannot import Figma data for which you do not have editing privileges.
Preparations for Importing Figma Data
Software Environment
The following software is needed in order to perform Figma data imports with Smart Importer:
Node.js (Supported versions: Only 18.x.x and 19.x.x)
Preparing the URL/Access Token
In order to perform Figma data imports with Smart Importer, a URL and Access Token that corresponds with the Figma Data needs to be acquired in advance.
The URL and Access Token can be acquired using the Figma desktop application as below.
Please ensure you have access to the Figma REST API (https://api.figma.com). In case of connectivity issue, please contact your IT as it might be blocked by a firewall.
Acquiring the URL
At the topmost bar in the Figma desktop application, right-click the relevant project tab and from the context menu select [Copy Link].

Acquiring the Access Token
- In the Figma desktop app, select [ Figma Icon > Help and Account > Account Settings ] to open the dialog.

- In the Security tab of the dialog, click [ Generate new token ] under Personal access tokens.

- In the "Generate new token" dialog, set the Token name, Expiration, and Scopes, and then click [ Generate token ].

- The created access token will be displayed under Personal access tokens on the Security tab of the dialog.

The instructions on how to obtain the URL and access token are for Figma Desktop App version 125.10.8.
How to Import Figma Data
1. From the Scene Composer toolbar select [Import] > [Smart Importer] > [From Cloud Resource...], and a new dialog panel titled [Import from cloud resource] will be displayed.

2. Enter the URL and Access Token in the respective fields and click [OK]. Please refer to「Preparing the URL/Access Token」 for acquiring the URL and Access Token.

3. The Smart Importer dialog panel will open. Operating Smart Importer here is no different to when importing other filetypes. For details, please see 「3. Scene Composer > Import of Resources > Smart Importer > How to Use the Smart Importer」. After making the necessary setting adjustments and clicking [OK], the data will be imported into the folder designated in [Import to folder: ].

If the URL or Access Token entered in the "Import from cloud resource" dialog is incorrect (or inappropriate), the import will be interrupted, and the following error dialog will appear.

API access limits vary depending on your subscription plan. Therefore, if that limit is exceeded, the import will be interrupted and the following error dialog will be displayed. Please check Figma’s official website for details on each plan.

Importing Figma Data - Advanced
Importing as a scene
The topmost item of each page included in the Figma data will be imported into Smart Importer as a scene. For this, use the following naming convention: <Page name>_<Parent item name>

Relationship between Figma items and Scene Composer Nodes
When importing Figma items with Smart Importer, each item will be imported as a specific type of node, as seen in the table below.
| Scene Composer node type |
||||
| Group | Bitmap | Text | ||
| Figma item type |
Component | ✓ | ||
| ComponentSet | ✓ | |||
| Ellipse | ✓ | |||
| Frame | ✓ | |||
| Group | ✓ | |||
| Instance | ✓ | |||
| Line | ✓ | |||
| Polygon | ✓ | |||
| Rectangle | ✓ | |||
| Section | ✓ | |||
| Slice | ✓ | |||
| Star | ✓ | |||
| Text | ✓ | |||
| Vector | ✓ | |||
Bitmaps and texts can only be imported when their render data is made available. For example, should a Figma item be set to "hidden", it cannot be imported.
Importing as Controls or Bitmaps
It is possible with Smart Importer to import as a control or bitmap any Figma items that can hold the following child items:
- Component
- ComponentSet
- Frame
- Group
- Instance
- Section
Importing as a control
An item can be imported as a control when it is named [SC_<control name>]. Furthermore, property values can also be set when using the names of control properties for the names of child items.

This functionality is only supported with Touchable and Common controls.
Importing as bitmaps
Smart Importer can import group items with child items as bitmaps when the the group item name is prefixed with [SC_Bmp].

Import as State Machine
When Figma flow functionality (screen transitions) is defined, Smart Importer imports the structure of screen transitions into CGI Studio as a state machine.
The imported state machine can be reviewed in the State Machine Editor within Scene Composer.
Settings on the Figma Side (Scenes and Flows)
On the Figma side, multiple scenes and flows (screen transitions) connecting them are defined. Screen transitions are constructed starting from the scene specified as the flow start point.

Import Result on the Scene Composer Side
The flow structure defined in Figma is imported into CGI Studio as a state machine by Smart Importer.

The state machine starts from the state that corresponds to the scene set as the flow start point in Figma. After importing, for each generated state, a screenshot of the corresponding Figma scene is automatically set, and the screenshot is displayed as a Scene Image in the State Machine Editor.

When multiple flows are defined, each flow is imported as an independent state machine.


Should a transition in one Flow be included in a separate Flow (ie. when a transition is duplicated), the separate Flow will not be imported.
Names and Behavior After Importing as a State Machine
- About Names After Import
- The name of the state machine after import is “StateMachine<Flow Name>”.
- The name of each state after import is the same as the Figma item name imported as a scene.
-
In Figma, it is possible to select the interaction that triggers screen transitions (such as click, drag, mouse over, etc.).However, regardless of which interaction is set, when importing with Smart Importer, the Transition properties in Scene Composer are set to:
- Event: `Clicked`
- Condition: `Check Click`
Importing a Layout
Auto layout
If a Figma Frame has an "Auto layout" set, it will be imported as a "Stack Layout" in Scene Composer, and each setting value of the Auto layout will be inherited as a Stack Layout property.

Figma Auto layout settings are inherited as properties of the Stack Layout of Scene Composer:

|
Auto layout (Figma) |
Stack Layout propertise (Scene Coposer) |
|||||||
| 1 |
Direction |
Stack Layout [ Layouter > Arrangement ] |
||||||
|
||||||||
| 2 |
Gap |
The node that is placed second or later in the Stack Layout |
||||||
|
||||||||
| 3 | Alignment |
Nodes included in a Stack Layout [ Layout > VerticalAlignment and HorizontalAlignment ] |
||||||
| 4 | Padding (Horizontal) |
The node to be placed at the leftmost position of the Stack Layout |
||||||
| 5 | Padding (Vertical) |
The node to be placed at the most top of the Stack Layout |
||||||
Below is an example of Auto layout (horizontal) from Figma imported into Scene Composer.

Text Layout
When Figma text layer is imported in Scene Composer, a Group node with LayoutType "Overlay" is created, and a text node is created under it.

Also, the Typography Alignment of the text layer from Figma is inherited as a layout property of the text node in Scene Composer.

Importing Fonts
When importing Figma data using the Smart Importer, if a font used in the Figma design does not exist in the current solution, the missing font can be imported.
During the import process, the fonts used in the Figma design are compared with the fonts available in the solution. If a font that does not exist in the solution is detected, the Smart Import dialog opens and font selection options are displayed.
In the Smart Import dialog, you can choose one of the following options for each missing font:
- Replace it with an existing font (select an existing font from the dropdown menu)
- Import the font as a new resource (select "Import" from the dropdown menu)

In the Smart Importer dialog, the "Import" option is displayed in the dropdown menu for each font only when the corresponding font can be imported.
If the Resources\Fonts folder does not exist in the solution, it is automatically created.
Automatic Text Mapping
When importing Figma data using the Smart Importer, the content of text nodes can be compared with the Language Table during import, and matching Text IDs can be automatically assigned. Previously, it was necessary to manually assign a Text ID to each text node after import. This feature enables automation of the mapping process.
When importing Figma data, the displayed text strings contained in the Figma data are compared with the master language strings in the Language Table. If a matching string is found, the corresponding Text ID for that string is automatically assigned.
Configuration

Behavior
This feature works in the following order: retrieve the text → compare it with the Language Table → assign the Text ID.
- Retrieve the text string from the text node
In the following example, the string "TEST" is retrieved.


- Compare the retrieved string with the master language in the Language Table
In the following example, the string retrieved in step 1 is compared with the master language [00] in the Language Table.

- If a match is found, assign the Text ID
(In the example below, the Text ID of the matching Language Table entry is assigned to the text node.)

If multiple Text IDs exist for the same text string, the first matching Text ID is used.
If no matching text string exists, no Text ID is assigned.