Skip to content

Figma

Platform binding for the Specs document format — draft.

Normative frame: SPECIFICATION.md §11. This document states how the Figma binding realises the schema; it does not restate what the members mean — that is the reference at /schema.

Generated from mappings/bindings/figma.json by scripts/build-mappings.mjs. Edit the binding file, never this page.

Rules

The rules that resolve jointly — where no single key or kind determines any single output, the rule’s ordered case table IS the mapping, on its own page. Keys and kinds in the surface tables below link back here through their rule column.

RuleSurfaceKeys
primitivePromotionAnatomytext, glyph, instance
typeDetectionAnatomytext, glyph, vector, container, line, ellipse, rectangle, polygon, star
wrapperCollapseAnatomycontainer, text, glyph
booleanContentPairingPropsboolean
codeOnlyPropsPropsimage
numberInferencePropsstring, number
variantAxesPropsboolean, enum, number
autoVsAbsoluteLayoutStylesposition, top, bottom, start, end, centerHorizontalOffset, centerVerticalOffset, layoutSizingHorizontal, layoutSizingVertical, width, height
namedStyleVersusInlineStylestypography
wrappingStyleswrap, wrapAlignment, itemSpacing, layoutMode, mainAxisAlignment, crossAxisAlignment

Styles

44 bound, 2 approximated, 2 unsupported, of 48 style keys.

A key whose row says rule does not map on its own — its rule is a case table on the rule’s own page. Writing a per-key mapping for it would be false, not merely incomplete.

DispositionKeysMeaning
bound44Realised, and confirmed against the implementation
approximated2Realised with loss, and the loss is stated
unsupported2Declared as not realised, with the resulting behaviour stated

Every row below is a claim a reader may rely on.

Style keyDispositionRealised by
aspectRatioboundnode.targetAspectRatio
backgroundColorboundnode.fills
bottomboundrule autoVsAbsoluteLayout
centerHorizontalOffsetboundrule autoVsAbsoluteLayout
centerVerticalOffsetboundrule autoVsAbsoluteLayout
clipsContentboundnode.clipsContent
cornerRadiusboundnode.cornerRadius
cornerSmoothingboundCornerStyle.applySmoothing
effectsboundEffects.apply
endboundrule autoVsAbsoluteLayout
fillColorboundnode.fills
heightboundrule autoVsAbsoluteLayout
itemReverseZIndexboundnode.itemReverseZIndex
itemSpacingboundrule wrapping
layoutModeboundrule wrapping
layoutSizingHorizontalboundrule autoVsAbsoluteLayout
layoutSizingVerticalboundrule autoVsAbsoluteLayout
lockedboundnode.locked
mainAxisAlignmentboundrule wrapping
maxHeightboundnode.maxHeight
maxLinesboundnode.maxLines
maxWidthboundnode.maxWidth
minHeightboundnode.minHeight
minWidthboundnode.minWidth
opacityboundnode.opacity
paddingboundnode.paddingTop / paddingRight / paddingBottom / paddingLeft
positionboundrule autoVsAbsoluteLayout
primaryAxisSizingModeboundnode.primaryAxisSizingMode
rotationboundnode.rotation
startboundrule autoVsAbsoluteLayout
strokeAlignboundnode.strokeAlign
strokeDashPatternboundnode.dashPattern
strokesboundnode.strokes
strokeWeightboundnode.strokeWeight
textAlignHorizontalboundnode.textAlignHorizontal
textAlignVerticalboundnode.textAlignVertical
textColorboundnode.fills
textOverflowboundnode.textTruncation
topboundrule autoVsAbsoluteLayout
typographyboundrule namedStyleVersusInline
visibleboundnode.visible
widthboundrule autoVsAbsoluteLayout
wrapboundrule wrapping
wrapAlignmentboundrule wrapping
backgroundImageapproximatednode.fills
crossAxisAlignmentapproximatedrule wrapping
gridColumnsunsupportedrule wrapping
gridRowsunsupportedrule wrapping

Props

A prop is declared once in the spec and realised differently by kind on each platform. Unlike a style key, a kind may carry its own row and be governed by a rule — a kind is a population of props, and different populations of it resolve differently.

Prop kindDispositionRealised by
booleanboundComponentPropertyDefinitions (BOOLEAN, or a two-option VARIANT) · rule variantAxes
enumboundVARIANT property options / ComponentSet variant axes · rule variantAxes
imageboundcode-only container layer named in figma.images.sourceProps“ · rule codeOnlyProps
numberboundTEXT default or all-numeric VARIANT options, under platforms.figma.inferNumberProps“ · rule variantAxes
objectboundseparator-delimited flat property names, under platforms.figma.objectProps“
slotboundComponentPropertyDefinitions (SLOT), plus slotSettings and preferredValues
stringboundComponentPropertyDefinitions (TEXT or INSTANCE_SWAP) · rule numberInference

Anatomy

An anatomy element’s names are the library’s; its TYPE is the contract’s, and the type is what each platform realises. A type may carry its own row and be governed by a rule — a type is a population of elements, and which type a node even becomes is itself a joint rule.

Element typeDispositionRealised by
containerboundFRAME or COMPONENT node · rule typeDetection
ellipseboundELLIPSE node · rule typeDetection
glyphboundINSTANCE or VECTOR reclassified by the library's glyphs convention · rule typeDetection
instanceboundINSTANCE node
lineboundLINE node · rule typeDetection
rectangleboundRECTANGLE node · rule typeDetection
slotboundSLOT node
textboundTEXT node · rule typeDetection
polygonapproximatedPOLYGON node · rule typeDetection
starapproximatedSTAR node · rule typeDetection
vectorapproximatedVECTOR node · rule typeDetection

Values and References

What a platform does with each form a VALUE may take — the scalar forms (a literal, the mixed sentinel) and the pointer grammar (SPECIFICATION §5.1’s six reserved-marker forms plus the $nested paths; DSPEC-42 for the style-value half). The set is closed: the safe key grammar admits no authored $-prefixed key, so no document can mint a new marker. Notes stay inline — the forms’ reference pages are hand-written and carry no generated binding section yet.

Reference formDispositionRealised byNotes
bindingboundcomponent property bindingsCapture writes a $binding wherever a Figma property drives an element member — content, visible, instanceOf. Render re-creates the property and re-attaches the binding by the id map the property pass returns; on a style value, the dedicated binding path wires the node field to the component property, not yet confirmed per key.
conditionalboundrender-path conditional evaluationThe ADR-018 conditional form is implemented on the render path: the condition’s binding target is resolved dynamically and the then/else branch applied. The one platform that honours it; not yet confirmed per key.
imageboundimage fills and the images registryCapture deduplicates image bytes into the registry and writes $image pointers (ADR-063); render restores fills and source layers from the registry.
literalboundnode properties, directlyThe ordinary case for every style value.
slotContentboundnested instances and override subtreesCapture deduplicates structured fills into the registries by structural equality and writes $slotContent pointers at the fill sites; render composes nested instances through the instance manifests.
subcomponentboundsibling components in one component set or fileA $ref into #/subcomponents/ captures from and renders back to the sibling component the pattern match identified.
themeboundexplicitVariableModes / setExplicitVariableModeForCollectionA token group is a variable collection and a theme is one of its modes. Capture reads a node’s own mode selections, never the resolved set its ancestors contribute to, which is what records a selection where it was made (DSPEC-74); render applies each selection to the collection the group names and clears it where the value is null. Group names are resolved against the variable collections the caller declares it holds, matched id then published key then name, and a collection that matches none is omitted and reported rather than recorded under the name the file answers with (DSPEC-80) — a file reports a renamed collection’s retired name, and a collection no held library publishes, with equal confidence. A caller that declares nothing is unfiltered.
tokenboundFigma VariablesCapture records the bound variable as a $token; render resolves the token path back to a variable and binds it. Where the variable cannot be resolved, the value falls back to the cached raw value the document carries — a degradation using only data the document holds (DSPEC-43).
nestedapproximatednested instance overridesCapture writes $nested paths for configuration deeper than one instance boundary (ADR-052). Render declares them unimplemented and skips them, reporting the skip — a stated loss, not a silent one.
elementTypeunsupported—Never produced: capture writes plain ElementType strings. An authored ElementTypeRef passes through opaque — resolution is a consumer concern by design (ADR-012).
mixedunsupported—Nothing is applied. A mixed value records that the source layer had no single value, so there is nothing to render and a rendered guess would be invented data. The sentinel is a defect signal about the Figma file, not a value a binding realises.

Defaults

What an absent style key means is spec-level, not per-platform: two platforms that answer differently disagree about what the same document says. It is declared once in the schema — each style key’s page marks its own default — and the ambiguity absence carries is stated on the Overview.

What this platform does on absence is its own fact, and is recorded per key below. A key whose behaviour is not declaredDefault disagrees with the contract — visibly, and as a decision rather than an accident.

BehaviourKeysMeaning
unverified48Nobody has established what this platform does when the key is absent.

Losses

What this platform does is settled and stated above. Where a loss is real, its acceptability is a product question rather than a specification’s to settle alone. 8 of 48 keys raise one of 4 such questions, of which 2 remain open.

  • A value is dropped rather than degraded. Affects backgroundImage. A gradient whose stops do not yield two resolvable colours is dropped whole. A padding side that is present but unresolvable is omitted while its siblings emit, whereas cornerRadius substitutes 0 for the same failure. DSPEC-43 says a degradation applies the spec’s own recorded fallback, or applies nothing and warns — dropping part of a value silently is neither. Open. See #816 on the disagreement between the composite types, and #815 on the gradient path.
  • Zero is not distinguishable from unset. Affects minWidth, minHeight. Both platforms currently treat a dimension of 0 as “no constraint” rather than “a constraint of zero”. Open. Deferred — see #814, and #812 on what an absent width/height means. The two interact and should be settled together.
  • A non-sRGB ColorObject renders as if it were sRGB. Affects backgroundColor, fillColor, textColor, strokes. The schema admits 14 colour spaces and the render path never reads colorSpace — components 0 through 2 are taken as red, green and blue regardless, so an oklch value is misread rather than approximated. A none component becomes 0, and components beyond the third are dropped. Decided. Convert to sRGB at render time (#813). The schema keeps all 14 spaces; the render path gains a conversion with gamut mapping for values outside sRGB. Until that lands, a non-sRGB ColorObject renders wrong rather than degraded.
  • Logical sides become physical without a direction. Affects padding. The schema uses start and end so a document is direction-agnostic. The Figma render maps start to the left padding with no writing-direction branch. Decided. Accepted as a platform limit. Figma cannot express a writing direction, so the mapping is left-to-right only and the loss is declared rather than fixed — which is what approximated means. CSS stays direction-safe by emitting padding-block and padding-inline.