Prop extensions
The $extensions object on a prop definition holds vendor-specific metadata under reverse-domain keys. Currently only the com.figma extension is defined. Extension data is provenance — a consumer MUST NOT need it to interpret the prop (the spec contract carries everything semantic), and the render direction reads it to reverse what capture recorded.
Path
component-api:props.<prop>.$extensions — on every prop kind.
PropExtensions
DTCG §5.2.3 platform-specific extensions for prop definitions. Each property is a reverse-domain key whose value is a platform extension type.
| Member | Type | Required | Description |
|---|---|---|---|
com.figma | FigmaPropExtension | No |
com.figma: type: VARIANT name: VariantFigmaPropExtension
DTCG §5.2.3 Figma-specific metadata for a prop definition.
| Member | Type | Required | Description |
|---|---|---|---|
type | unknown | No | Figma-native property type |
source | FigmaCodeOnlySource | No | Provenance metadata — present only for props extracted from a code-only container layer |
name | string | No | The Figma component-property name (ADR-066). |
type: VARIANTname: SizeFigmaCodeOnlySource
Provenance metadata for props extracted from a Figma code-only container layer.
| Member | Type | Required | Description |
|---|---|---|---|
kind | 'codeOnlyProp' | Yes | Discriminator identifying this prop as originating from a code-only container |
layer | string | Yes | Sub-layer name within the code-only container tree corresponding to this prop |
instanceOf | string | No | For enum code-only props: the component name of the nested instance whose variants define the enum values |
kind: codeOnlyProplayer: Code only propsScenarios
Every shape below is one specs generate actually writes, keyed by what produced it. A prop may combine them — name joins whatever else the prop’s extraction recorded.
A two-option VARIANT read as a boolean. The axis’s options were exactly true/false, so the prop is a BooleanProp; the recorded type is what tells render to rebuild a variant axis rather than a BOOLEAN property.
isCompact: type: boolean default: false $extensions: com.figma: type: VARIANTA consolidated visibility pair. A BOOLEAN property only ever toggled the element this content prop fills, so the boolean was consumed into the content prop’s nullability and named here — render re-creates it. The value is the Figma property’s own name, verbatim: capitalisation and spacing as the component set spells it, never a formatted key, because render looks the property up by that string.
badgeLabel: type: string nullable: true default: null $extensions: com.figma: visibilityProp: Badge visibleA code-only prop from a hidden TEXT layer. String- or number-valued; source names the sub-layer so render can mint the hidden layer back.
headingLevel: type: number default: 2 $extensions: com.figma: type: TEXT source: kind: codeOnlyProp layer: headingLevelA code-only enum from a nested instance. The nested component’s variant options define the enum values, and instanceOf names which component — a two-option true/false instance mints a boolean through the same shape.
role: type: string default: status enum: [status, alert, log] $extensions: com.figma: type: VARIANT source: kind: codeOnlyProp layer: role instanceOf: RoleOptionsA code-only image prop. Minimal by design (ADR-063): the authoring-default image rides on the ImageBinding at the binding site, not here.
imageSource: type: image $extensions: com.figma: type: TEXT source: kind: codeOnlyProp layer: imageSourceA key the formatting could not reconstruct (ADR-066). The Figma property name fell outside the safe key grammar — or was already in the destination format — so name records it and reversal is a lookup, not a re-derivation.
showIcon: type: boolean default: true $extensions: com.figma: name: "Show icon?"A folded object-prop member (ADR-111). Each member records the separator-delimited flat property name it folded from; the parent ObjectProp records nothing — it has no Figma counterpart of its own.
margin: type: object members: compact: type: string default: none enum: [none, small, large] $extensions: com.figma: name: margin.compactDecisions
- ADR-027 — Code-Only Props
- ADR-066 — Lossless key formatting — safe key grammar and Figma name preservation
Source
| Format | File |
|---|---|
| JSON Schema | packages/schema/schema/component.schema.json |
| TypeScript | packages/schema/types/Props.ts |
| Specification | §4.2, §11 |