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).
| Property | Value type | Figma key (if different) | Default |
|---|---|---|---|
aspectRatio | AspectRatioValue | — | null |
backgroundBlur | Blur | (via effects) | — |
backgroundColor | ColorStyle | fills ADR 009 | null |
backgroundImage | ImageValueTokenReference | fills (IMAGE) ADR 063 | null |
bottom | PositionOffset | y and constraints ADR 041 | null |
centerHorizontalOffset | PositionOffset | x and constraints ADR 041 | null |
centerVerticalOffset | PositionOffset | y and constraints ADR 041 | null |
clipsContent | Style | — | false |
cornerRadius | StyleCorners | — | 0 |
cornerSmoothing | Style | — | 0 |
crossAxisAlignment | CrossAxisAlignment | counterAxisAlignItems ADR 040 | "START" |
effects | TokenReferenceEffects | — | null |
end | PositionOffset | x and constraints ADR 041 | null |
fillColor | ColorStyle | fills ADR 013 | null |
fontFamily | stringTokenReference | (via typography) | null |
fontSize | numberTokenReference | (via typography) | 16 |
fontStyle | stringTokenReference | (via typography) | null |
hangingList | boolean | (via typography) | false |
hangingPunctuation | boolean | (via typography) | false |
height | Style | — | 0 |
itemReverseZIndex | Style | — | false |
itemSpacing | StyleItemSpacing | — | 0 |
layerBlur | Blur | (via effects) | — |
layoutMode | LayoutMode | — | "NONE" |
layoutSizingHorizontal | Style | — | "FIXED" |
layoutSizingVertical | Style | — | "FIXED" |
leadingTrim | string | (via typography) | "NONE" |
letterSpacing | numberTokenReference | (via typography) | 0 |
lineHeight | numberstringTokenReference | (via typography) | "AUTO" |
listSpacing | number | (via typography) | 0 |
locked | Style | — | false |
mainAxisAlignment | MainAxisAlignment | primaryAxisAlignItems ADR 040 | "START" |
maxHeight | Style | — | null |
maxLines | Style | — | null |
maxWidth | Style | — | null |
minHeight | Style | — | 0 |
minWidth | Style | — | 0 |
opacity | Style | — | 1 |
padding | StyleSides | — | 0 |
paragraphIndent | numberTokenReference | (via typography) | 0 |
paragraphSpacing | numberTokenReference | (via typography) | 0 |
position | Position | layoutPositioning ADR 041 | "AUTO" |
primaryAxisSizingMode | Style | — | "AUTO" |
rotation | Style | — | 0 |
shadows | Shadow[] | (via effects) | — |
start | PositionOffset | x and constraints ADR 041 | null |
strokeAlign | Style | — | "INSIDE" |
strokeDashPattern | StrokeDashPattern | strokeDashes ADR 059 | null |
strokeWeight | StyleSides | — | 0 |
strokes | ColorStyle | — | null |
textAlignHorizontal | TextAlignHorizontal | textAlignHorizontal (remapped) ADR 064 | "START" |
textAlignVertical | Style | — | "TOP" |
textCase | string | (via typography) | "ORIGINAL" |
textColor | ColorStyle | fills ADR 009 | null |
textDecoration | string | (via typography) | "NONE" |
textOverflow | TextOverflow | textTruncation (remapped) ADR 062 | "CLIP" |
top | PositionOffset | y and constraints ADR 041 | null |
typography | TokenReferenceTypography | — | null |
visible | booleanTokenReferencePropBindingConditional | — | true |
width | Style | — | 0 |
wrap | Style | layoutWrap ADR 039 | false |
wrapAlignment | WrapAlignment | counterAxisAlignContent ADR 039 | null |
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:
| Key | Type |
|---|---|
$text | TextContentStyles |
$glyph | GlyphContentStyles |
TextContentStyles
Six properties and nothing else:
| Property | Type |
|---|---|
textColor | ColorStyle |
typography | TokenReferenceTypography |
textAlignHorizontal | TextAlignHorizontal |
textAlignVertical | Style |
textOverflow | TextOverflow |
maxLines | Style |
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:
| Property | Type |
|---|---|
fillColor | ColorStyle |
width | Style |
height | Style |
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 | |
|---|---|---|
| Colour | textColor | fillColor |
| Size | — the run is measured by its container | width, height |
| Typography, alignment, overflow, line clamp | yes | no |
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.