MCPcopy Index your code
hub / github.com/figma/code-connect

github.com/figma/code-connect @v1.4.9

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.4.9 ↗ · + Follow
829 symbols 2,081 edges 258 files 80 documented · 10% 4 cross-repo links updated 2d agov1.4.9 · 2026-07-06★ 1,540198 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Code Connect

Code Connect is a tool for connecting your design system components in code with your design system in Figma. When using Code Connect, Figma's Dev Mode will display true-to-production code snippets from your design system instead of autogenerated code examples. In addition to connecting component definitions, Code Connect also supports mapping properties from code to Figma enabling dynamic and correct examples. This can be useful for when you have an existing design system and are looking to drive consistent and correct adoption of that design system across design and engineering.

Code Connect is easy to set up, easy to maintain, type-safe, and extensible. The easiest way to get started is using template files — a framework-agnostic way to represent any code snippet, giving you full control over how components appear in Dev Mode. Code Connect also includes framework-specific integrations for React (and React Native), Storybook, HTML (e.g. Web Components, Angular and Vue), SwiftUI and Jetpack Compose.

image

[!NOTE] Code Connect is available on Organization and Enterprise plans and requires a full Design or Dev Mode seat to use.

Documentation

Use Figma’s Code Connect to make your design system easily accessible to your developers and create a shared source of truth for both the design and code elements.

Our Getting Started guide will walk you through setting up Code Connect and publishing your first components using template files. Code Connect Documentation →

For framework-specific prop mapping and variant support, see the integration guides for:

Extension points exported contracts — how you extend this code

TemplateStringResult (Interface)
(no doc)
cli/figma-types-no-require.d.ts
TemplateStringResult (Interface)
(no doc)
cli/figma-types.d.ts
ConvertStorybookFilesArgs (Interface)
(no doc)
cli/src/storybook/convert.ts
ParseCodeConnectWorkParameters (Interface)
(no doc)
compose/plugin/src/main/kotlin/com/figma/code/connect/ParseCodeConnectWorkAction.kt
SelectorOptions (Interface)
(no doc)
cli/figma-types-no-require.d.ts
SelectorOptions (Interface)
(no doc)
cli/figma-types.d.ts
FigmaStoryMetadata (Interface)
(no doc)
cli/src/storybook/convert.ts
PropertyMapping (Interface)
(no doc)
compose/plugin/src/main/kotlin/com/figma/code/connect/models/PropertyMapping.kt

Core symbols most depended-on inside this repo

parse
called by 77
compose/plugin/src/main/kotlin/com/figma/code/connect/ParseCodeConnectTask.kt
tidyStdOutput
called by 57
cli/src/__test__/utils.ts
migrateV1TemplateToV2
called by 56
cli/src/connect/migration_helpers.ts
exitWithError
called by 38
cli/src/common/logging.ts
parseRawFile
called by 37
cli/src/connect/raw_templates.ts
escapeJavaScriptString
called by 36
compose/plugin/src/main/kotlin/com/figma/code/connect/models/PropertyMapping.kt
toString
called by 35
cli/src/connect/parser_common.ts
escapeForTemplateLiteral
called by 34
compose/plugin/src/main/kotlin/com/figma/code/connect/JSTemplateCreator.kt

Shape

Function 532
Method 145
Interface 80
Class 64
Enum 8

Languages

TypeScript83%
Kotlin17%

Modules by API surface

cli/figma-types.d.ts39 symbols
cli/figma-types-no-require.d.ts39 symbols
cli/src/connect/project.ts27 symbols
cli/src/connect/wizard/run_wizard.ts23 symbols
cli/src/connect/migration_batch_helpers.ts23 symbols
cli/src/connect/parser_common.ts22 symbols
cli/src/connect/intrinsics.ts20 symbols
compose/plugin/src/test/kotlin/com/figma/code/connect/models/PropertyMappingTest.kt19 symbols
cli/src/connect/migration_helpers.ts19 symbols
compose/plugin/src/test/kotlin/com/figma/code/connect/JSTemplateCreatorTest.kt18 symbols
cli/src/react/parser.ts18 symbols
compose/plugin/src/main/kotlin/com/figma/code/connect/models/PropertyMapping.kt17 symbols

For agents

$ claude mcp add code-connect \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page