Skip to content

aspectRatio

The ratio the element’s width and height are locked to.

Path

…elements.<element>.styles.aspectRatio

Elements Supported

component · container · ellipse · glyph · polygon · rectangle · slot · star · text · vector

Value

AspectRatioValue

Aspect ratio expressed as a numerator/denominator pair. x is the numerator, y is the denominator (e.g. x:16, y:9 for 16:9).

x: 16
y: 9
x: 1
y: 1

null (default)

Platform bindings

Figma

Disposition: bound · Realised by: node.targetAspectRatio

Deferred to last — the lock reads the node final dimensions, so an earlier resize would be clobbered by later sizing keys.

CSS

Disposition: bound · Realised by: rule intrinsicSize

Resolved jointly with

This key does not map on its own. Its rule’s ordered case table is linked above.

intrinsicSize — CSS

Decisions

  • ADR-004 — Add aspectRatio to Styles
  • ADR-113 — Style defaults belong to the schema

Rules

RuleStatement
DSPEC-44Every property of Styles declares a default, and its value validates against that property’s own schema
DSPEC-45A declared default is a literal, never a TokenReference, PropBinding or Conditional
DSPEC-47Jointly resolved keys are stated as an ordered case table over a declared operand set, not as prose

Source

FormatFile
JSON Schemapackages/schema/schema/styles.schema.json
TypeScriptpackages/schema/types/Styles.ts
Specification§4.1a, §11