Skip to content

Styles

The Styles object holds visual properties for an element. Every property is optional. Which properties are evaluated depends on the element type. Source: packages/schema/types/Styles.ts.

The Default column is the value a property is treated as having when absent — the value the Figma → spec transform diffs against to decide whether to omit it from output. — means the property has no transform-level default (effects properties, and effects/typography themselves resolve through their own nested defaults).

PropertyValue typeFigma key (if different)Default
aspectRatioAspectRatioValue—null
backgroundBlurBlur(via effects)—
backgroundColorColorStylefills ADR 009null
backgroundImageImageValue
TokenReference
fills (IMAGE) ADR 063null
bottomPositionOffsety and constraints ADR 041null
centerHorizontalOffsetPositionOffsetx and constraints ADR 041null
centerVerticalOffsetPositionOffsety and constraints ADR 041null
clipsContentStyle—false
cornerRadiusStyle
Corners
—0
cornerSmoothingStyle—0
crossAxisAlignmentCrossAxisAlignmentcounterAxisAlignItems ADR 040"START"
effectsTokenReference
Effects
—null
endPositionOffsetx and constraints ADR 041null
fillColorColorStylefills ADR 013null
fontFamilystring
TokenReference
(via typography)null
fontSizenumber
TokenReference
(via typography)16
fontStylestring
TokenReference
(via typography)null
hangingListboolean(via typography)false
hangingPunctuationboolean(via typography)false
heightStyle—0
itemReverseZIndexStyle—false
itemSpacingStyle
ItemSpacing
—0
layerBlurBlur(via effects)—
layoutModeLayoutMode—"NONE"
layoutSizingHorizontalStyle—"FIXED"
layoutSizingVerticalStyle—"FIXED"
leadingTrimstring(via typography)"NONE"
letterSpacingnumber
TokenReference
(via typography)0
lineHeightnumber
string
TokenReference
(via typography)"AUTO"
listSpacingnumber(via typography)0
lockedStyle—false
mainAxisAlignmentMainAxisAlignmentprimaryAxisAlignItems ADR 040"START"
maxHeightStyle—null
maxLinesStyle—null
maxWidthStyle—null
minHeightStyle—0
minWidthStyle—0
opacityStyle—1
paddingStyle
Sides
—0
paragraphIndentnumber
TokenReference
(via typography)0
paragraphSpacingnumber
TokenReference
(via typography)0
positionPositionlayoutPositioning ADR 041"AUTO"
primaryAxisSizingModeStyle—"AUTO"
rotationStyle—0
shadowsShadow[](via effects)—
startPositionOffsetx and constraints ADR 041null
strokeAlignStyle—"INSIDE"
strokeDashPatternStrokeDashPatternstrokeDashes ADR 059null
strokeWeightStyle
Sides
—0
strokesColorStyle—null
textAlignHorizontalTextAlignHorizontaltextAlignHorizontal (remapped) ADR 064"START"
textAlignVerticalStyle—"TOP"
textCasestring(via typography)"ORIGINAL"
textColorColorStylefills ADR 009null
textDecorationstring(via typography)"NONE"
textOverflowTextOverflowtextTruncation (remapped) ADR 062"CLIP"
topPositionOffsety and constraints ADR 041null
typographyTokenReference
Typography
—null
visibleboolean
TokenReference
PropBinding
Conditional
—true
widthStyle—0
wrapStylelayoutWrap ADR 039false
wrapAlignmentWrapAlignmentcounterAxisAlignContent ADR 039null

Element-type applicability (container/text/glyph/vectors/line) moves to per-property pages once those exist.

ContentStyles

A second style type, carried by Element.contentStyles. Styles describes an element’s own appearance; ContentStyles describes the appearance of primitive content filling it.

It is a map keyed by the primitive markers a slot’s anyOf carries, because default slot content may hold more than one primitive and each is formatted by a different set:

KeyType
$textTextContentStyles
$glyphGlyphContentStyles

TextContentStyles

Six properties and nothing else:

PropertyType
textColorColorStyle
typographyTokenReference
Typography
textAlignHorizontalTextAlignHorizontal
textAlignVerticalStyle
textOverflowTextOverflow
maxLinesStyle

typography carries the composite, so its own members (fontSize, fontFamily, lineHeight and the rest) travel inside it rather than being listed again.

GlyphContentStyles

Three properties:

PropertyType
fillColorColorStyle
widthStyle
heightStyle

A glyph is sized, not laid out. Its box is the icon’s own, set on the layer, and a slot’s layout does not derive it the way a text run’s measure is derived from its container — so a glyph fill recorded without its dimensions has lost them, with nothing for a render to restore.

That is why width and height are glyph members and not text members. The two sets overlap in nothing, and each holds a member the other must not:

$text$glyph
ColourtextColorfillColor
Size— the run is measured by its containerwidth, height
Typography, alignment, overflow, line clampyesno

Both sets are closed

Each property is typed identically to its Styles counterpart, so a value valid in styles is valid here — token references, prop bindings and conditionals included, wherever the underlying type is Style.

Nothing outside a set may appear in it. A container’s padding, backgroundColor, minWidth or layoutMode is invalid under either key, so a generator cannot record an element’s own layout as content formatting. The sets do not leak into each other either: typography under $glyph is invalid, as is fillColor or width under $text.

A new key — an $image, say — would arrive with its own property set, touching neither existing kind.