SVG Profile
Purpose
The profile is designed for importing SVG assets from Figma.
The asset import process consists of the following stages:
- Fetch Figma remote: REST API reference
- Locate the node ID by the specified name
- Request SVG export from Figma using the node ID: REST API reference
- Download the exported SVG file
Complete Configuration in .figtree.toml
[profiles.svg]
# ID from the [remotes] section.
# Uses the default remote if unspecified, but can reference any configured remote
remote = "some_remote_id"
# Target directory for downloaded assets.
# Defaults to empty (root package directory where .fig.toml resides)
output_dir = "some_dir"
# Specifies which variants to use. Only the listed keys will be processed.
# Can be overridden in .fig.toml for each resource
variants.use = ["L", "M", "S"]
# Available variants
# output_name - filename for the exported file
# figma_name - node name in Figma to look for
variants.L = { output_name = "{base}L", figma_name = "{base}_24" }
variants.M = { output_name = "{base}M", figma_name = "{base}_20" }
variants.S = { output_name = "{base}S", figma_name = "{base}_16" }
variants.XS = { output_name = "{base}XS", figma_name = "{base}_12" }