Skip to content

objectFit

Path

…elements.<element>.styles.backgroundImage.objectFit

Value

  • "COVER" (default) — The image fills the layer, cropping whichever axis overflows.
  • "CONTAIN" — The whole image is visible within the layer, leaving space on whichever axis is shorter.

Decisions

  • ADR-063 — Image content — backgroundImage fill, an images registry, ImageProp, and ImageBinding
  • ADR-116 — Nested style members declare their own defaults

Source

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