- Fixed
getBoolean()returningundefinedinstead offalsewhen a boolean property is set tofalsein a template file. - Fixed some TS discrepancies in the
figma.*API in template files - Some fixes for the migration script
- Fixed args inconsistency in Swift and Compose helpers that could cause errors during template rendering.
- Added
--file(-f) option toparse,publish, andunpublishcommands to process a single Code Connect file instead of the entire project (e.g.figma connect parse --file=src/Button.figma.tsx).
- The
migratecommand now outputs TypeScript (.figma.ts) files by default. Pass--javascriptto output JavaScript (.figma.js) files instead. - The
migratecommand now outputsimport figma from "figma"(ESM syntax) when using the--typescriptflag - The
migratecommand now removes__propsmetadata blocks by default. Pass--include-propsto preserve them. - Storybook connections can now be migrated by the template migration script
- Fixed incorrect
documentUrlSubstitutionswhen one key is a prefix of another (e.g.SearchInputandSearchInputMenu). The CLI now processes longer keys first so the correct substitution is applied. - Publishing with
--batch-sizenow retries automatically on rate-limit (429) and server error (5xx) responses, respecting theRetry-Afterheader when present, rather than failing immediately - Fixed an issue around
.figma.js/.figma.tsfiles being incorrectly treated as template files
- The
--include-template-filesflag now shows a deprecation warning instead of causing an error. The flag is no longer necessary as template files are automatically included by default.
- Code Connect now supports default branch names other than
master/main. For cases where it can't be detected automatically, you can setdefaultBranchin yourfigma.config.json.
- Variant restrictions are now handled by the
migratescript. These are inlined into one template file with if/else blocks. - TypeScript is now supported for raw template files (
.figma.template.ts/.figma.ts).- ESM import syntax is now supported for the Figma API:
import figma from 'figma' - Type-only imports (
import type) are supported - Other module imports are not yet supported
- To enable types for the
figmaAPI, add"@figma/code-connect/figma-types"to thetypesarray in yourtsconfig.json. - TypeScript files are the default output of the
migratecommand. Can pass--javascriptto output JavaScript (.figma.js) files instead.
- ESM import syntax is now supported for the Figma API:
- Fixed issue with publishing template files without a
sourcevalue
- Add support for
figma.slot()to map Figma slot layer properties in Code Connect files.
- Added a beta migration script to migrate parser-based Code Connect files to parserless templates under
figma connect migrate. - The default extension for parserless/template files is now
.figma.jsinstead of.figma.template.js. The old.figma.template.jsextension is still fully supported for backwards compatibility. - Removed
--include-template-filesflag. Template files (.figma.jsand.figma.template.js) are now always included when detected. - Add support for
instance.getSlot(name)in templates to reference "slot" properties. - Parserless templates now support optional
componentandsourcecomment fields (e.g.,// component=Button)
- Add --api-url option to use a different code-connect api endpoint. This option can also be configured in figma.config.json with the
apiUrlfield - Add
languageconfig option to override syntax highlighting language in figma.config.json
- Syntax highlighting + formatting for parserless templates when publishing with a known label (e.g. React)
- Fix crash that occurs when the provided Figma file has no components
- Set version number for annotations gradle plugin
- Security update: upgraded undici to fix CVE-2026-22036. Roll back and report if you encounter networking issues.
- Security update: upgraded lodash to fix CVE-2025-13465.
- Fixed a problem with path alias imports incorrectly importing index files
- Fixed parsing failure for Compose in Windows.
- Fixed a corner case where the swift parser generated invalid code-connect code.
- Updated glob dependency to 11.0.4 to fix security vulnerability
- Improve response of publish command to display succeeded and failed nodes
- Fixed parsing failure in
createcommand
- Display both failed and succeeded components details when publishing.
- Fixed an issue where if there were multiple modules/files connecting to the same FigmaNode the parser only recognize the first module/file found.
- Update
libs.versions.tomlKotlin version to2.2.21.
unpublishcommand showing success message in certain cases where the action didn't complete properlty.- Fixed path alias imports not being resolved.
- Released a new Code Connect plugin version (1.2.3) that works with JDK 17.
- Fixed an issue that was happening in the parser where special characters weren't escaped properly, causing snippets to fail to evaluate.
- Fixed
swift-syntaxdependency to include support for 602.0.0. Thanks to @luispadron for the PR
- Updated
npx connect unpublish --nodeto require a--labelparam so it can unpublish any label type.
- Fixed parsing issue with multi-module projects.
- Updated
swift-syntaxto support 602.0.0. Thanks to @luispadron for the PR - Fixed protocol inheritance for Swift 6.2. Thanks to @rmenezes for the PR
- Fixed "Failed to fetch embeddings" error if empty payload in interactive setup
- Retain the temporary file and directory when
--verboseis enabled for improved debugging.
- Fixed SourcePackages directory not found.
- Added optional sourcePackagesPath parameter for when the default derived data folder is not used.
- Updated
swift-syntaxto support 601.0.1.
- Support getProps inside nestedProps
- Enhanced
--verbosecommand to output detailed stacktrace.
- Bumped Undici version to address security issue
- Added support for GitHub Enterprise source links (fixes #259)
- Fixed incompatibility issue with React 19 (fixes #265)
- Fixed issue with numeric characters in property names
- Allow examples to return strings to support icon IDs (fixes #252)
- Allow .gradle files to be detected as Android/Compose projects. Thanks to @sebastienrouif for the PR
- Remove prompts patching (fixes #241)
- Added
interactiveSetupFigmaFileUrlto the interactive setup, allowing you to specify the Figma file to use for connecting components in yourfigma.config.jsonfile. - Rename
--include-raw-templatesflag to--include-template-files. Further details of this feature can be found in the documentation.
- Updated
swift-syntaxto point to the new URL. Thanks to @pontusJPaf for the PR.
- Add support for JSX Figma connection files.
- Added an option to automatically create or append the access token to the project's .env file
- Add better handling of many figma components in the wizard (grouping per page)
- Allow variant restrictions to use boolean-like properties
- Added support for Bitbucket, Gitlab and Azure DevOps for generated source file URLs
- Don't show a red-cross when the file-matching prompt is finished in the wizard
- Add default values for
@FigmaEnumdeclarations in SwiftUI
- Fixed a formatting error when running the CLI
- Fix nested objects and arrays in props not rendering properly in code snippets
- Fixed a type issue when passing functions as values to
figma.boolean - Add support for multiple exports per file in the wizard
- Add support for different props per example (fixes #143)
- Add support for
linksandimports(fixes #142)
- Fix issue with CLI not working on some cases in 1.2.3
- In the interactive setup, the automatic file linking now matches components exported from index files
- Fix issue where React component references in
propswould serialize to strings when accessed withgetProps() - Fix issue with nesting
figma.booleanandgetProps
- Added support to create Custom parsers. Those allow users to add support for languages which aren't natively supported by Code Connect. Check the documentation for more details.
- Only show AI question for React
- Fix error in autolinking in reduce function
- Added a
--exit-on-unreadable-filesflag to all commands to exit if any Code Connect files cannot be parsed. We recommend using this option for CI/CD.
- Fixed a bug introduced in 1.2.0 where
nestedPropsreferencing a hidden layer would result in an error rendering Code Connect
- Fixed potential "index is out of bounds" error.
- Changed how the extension makes HTTP requests to resolve issues when connecting through a proxy. Please submit a support ticket if you continue to have connection issues after this update.
- Fixed some parsing errors when running the
createandpublishcommands
-
The interactive setup now offers AI support for accurate prop mapping between Figma and code components. Users will now be given the option to use AI during the setup process, which if chosen will assist in creating Code Connect files and attempting to accurately map your code to Figma properties.
Data is used only for mapping and is not stored or used for training. To learn more, visit https://help.figma.com/hc/en-us/articles/23920389749655-Code-Connect
- Added support for returning strings or React components from the
examplefunction, in addition to JSX - Added
getPropsonfigma.instance()which can be used to access props of a nested connected component - Added
renderonfigma.instance()which can be used to render a nested connected component dynamically - Added support for including any custom props in the
propsobject, that can be accessed withgetPropsin a parent component
- Case of attribute names is now preserved to support Angular (fixes #172)
- Fixed a bug with
nestedProps(fixes #176)
- Fixed a Prettier bug with the interactive setup
- Removed empty enum mappings from generated Code Connect in interactive setup
- Fixed an issue with props not rendering correctly in the Figma UI if used in the body of a component (e.g. as a hook argument). Any Code Connect with this issue will need republishing to be fixed. (fixes #167)
- Support mapping from an enum value to a boolean prop in CLI Assistant
- The dependencies required to author Code Connect files now live in a separate module from the plugin and are hosted on Maven Central. Refer to the documentation for updated instructions on adding Code Connect to your project.
- Updated the swift-syntax dependency to include 600.0.0 (Swift 6)
- Fixed an issue where
importswas incorrectly not included in the TypeScript interface - Added a note in the documentation that HTML support requires
moduleResolution: "NodeNext"
- Fixed an issue where
importswas incorrectly not included in the TypeScript interface (fixes #159)
- Code Connect files created in the CLI assistant will now start try to use auto-generated prop mappings in the component props. This is an early feature and support for different types is limited.
- Fixed an issue with
clientexport used by the icon script (fixes #156)
- Fixed an issue where the
@figma/code-connect@1.1.0npm package had an incorrect README
-
Added support for documenting HTML-based frameworks (including Web Components, Angular and Vue), using the new
htmlparser. See the documentation for more information.HTML support for Code Connect is in preview, and the API is liable to change during this period. Please let us know your feedback via GitHub Issues.
- Added a
swiftPackagePathconfiguration option to specify a custom path to aPackage.swiftfile to run Code Connect from.
- Code Connect files created in the CLI assistant will now start including some auto-generated prop mappings between Figma properties and linked code props. This is an early feature and support for different prop types is limited.
- Restructured the Code Connect documentation. All documentation can now be found in the docs directory.
figma.nestedPropscan now be used in conjunction withfigma.booleanfor conditionally hidden nested instances (fixes #118, #89)- Fixed an issue where backticks could not be used in the example code (fixes #139)
- Fixed an issue with wildcard paths in import mappings
- Fixed an error when trying to use the icon script with component sets
- Fixed issue where props with special characters such as hyphens would not render properly. (#116)
- figma.enum now supports floating point numbers
- Update the dependency for Code Connect to use Kotlin 2.0 libraries
- Fixed an issue around creation of Code Connect files from the CLI assistant (fixes #125)
- Fixed rendering of identifiers, functions and objects when used as children
- Updated the
componentdefinition in FigmaConnect protocol to be optional and have a default implementation.
- Added a more helpful error message when the JDK version is too low.
- Added error message to suggest splitting publish when request too large
- CLI assistant support for selecting file exports to use in Code Connect template
- New --batch-size argument for publish command in order to split uploading into smaller "batches". This will allow for large uploads without having to split running the publish command with different directories.
- Add support for hyphens in prop names (fixes #97)
- Fixed
checkoutsfolder resolution edge case
- Fixed issue with
createcommand creating invalid code - Added import resolution for components
- Added support for SwiftUI and Compose in the CLI Assistant
- Added
--skip-update-checkflag - Added
--labelflag to thepublishandunpublishcommands to publish or unpublish to a custom label - We now print the label used when running the
publishcommand - Improved autolinking algorithm
- Improvements to CLI Assistant
- Prevent rendering empty strings as prop values (Fixes: #67)
- Fix output when there are multiple return statements
- Fix wildcard importPaths mappings with nested folders
- Fix boolean mappings for lowercase boolean-like strings (Fixes: #70)
- Fix boolean-like keys in enums (Fixes: #74)
- Fix spaces in Xcode file path
-
The automatic update check introduced in v1.0.0 did not show the correct update command for React users with the
@figma/code-connectpackage installed locally – it always showed the command for globally updating the package.We now show both
npm install @figma/code-connect@latestandnpm install -g @figma/code-connect@latestas options. React users with the package installed locally should usenpm install @figma/code-connect@latest, and users of other targets (or with the package installed globally) should usenpm install -g @figma/code-connect@latest.We have temporarily removed the
updatecommand added in v1.0.0.
- Added documentUrlSubstitutions config option
- Added support for Android Jetpack Compose. See the README to get started
- Interactive setup flow, launched by running
figma connect, which guides you through the setup process and auto-connects your components
- Automatic config migration (added in v0.2.0) now correctly preserves
include/excludeconfig options - Icon script helpers moved to a named export so they can be imported correctly (see README)
- Nested helpers within
figma.nestedPropsnow work as expected - Props can now be rendered in nested object props
createnow outputs Swift files with the correct syntax
- Fixed a bug in v0.2.0 where source paths for components could be incorrect
- Fixed a bug in v0.2.0 where Code Connect files using the new prop types failed to validate
- Fixed parsing of Code Connect files using
@FigmaChildrenannotations
-
Code Connect now uses a single CLI tool for all supported targets. This ensures consistency and feature parity, and provides the foundations for our upcoming Android Compose and extensibility support.
For Code Connect Swift users, you should follow the updated CLI installation instructions to install the new CLI version, and update your Code Connect Swift package to
v0.2.0by following the Swift installation instructions.For Code Connect React users, no change to installation is necessary, and you can simply update the npm dependency to
v0.2.0.If you have a Code Connect configuration file, you will need to ensure it is located in your React or SwiftUI project root (e.g. alongside your
package.jsonor.xcodeprojfile), and you will need to update it to remove the top levelreactorswiftuikey. The Code Connect CLI will offer to update your config file for you, but in unusual cases a manual migration may be necessary. This allows us to simplify configuration going forward, as each target now has its own configuration file, situated in the project root.Please let us know via GitHub Issues if you encounter any problems.
- Added
--outDiroption toconnect createto specify output directory for created files
- Added support for nested properties, using
figma.nestedProps - Added support for concatenating strings for CSS class names, using
figma.className - Added support for text content from layers, using
figma.textContent - Added support for wildcards with
figma.children
- Added a new API for prop mapping, using
@FigmaString,@FigmaBooleanand@FigmaEnuminstead of@FigmaProp. The old syntax is still supported, but we recommend using the new syntax going forward. - Added support for nested children, using the
@FigmaChildrenproperty wrapper - Added support for rendering single-statement nested Code Connect inline
- Fixed detection of default git branch name
- Nested components now honour variant restrictions (fixes #54)
- Multiline JSX and strings are now supported in
figma.enumvalues - Added support for objects, JSX and functions in
figma.booleanenums - Imported values referenced from a
figma.enum(e.g. values from an object orenum) now render correctly (fixes #55)