Skip to content

backgroundImage

An image painted as a layer’s fill, used where the library has no image component to bind instead.

Path

…elements.<element>.styles.backgroundImage

Elements Supported

component · container · slot

Value

TokenReference

A design token, written as a $token path plus a $type, as in { $token: Color/On surface, $type: color }. The consuming platform resolves it to a value.

ImageValue

An image fill value — a reference into an images registry plus optional fit.

$image: "#/images/hero"
objectFit: COVER

null (default)

Themes

A TokenReference written here resolves under the theme in force on this element — the one it selects in themes, or the nearest ancestor’s. The same token path yields a different value under a different theme.

Platform bindings

Figma

Disposition: approximated · Realised by: node.fills

Appends an image paint rather than replacing existing fills. Loss: objectFit is binary — CONTAIN becomes Figma’s FIT and everything else, including absent, becomes FILL. An image whose hash does not resolve is dropped with no warning. Container types only.

CSS

Disposition: approximated · Realised by: —

Emitted from the sheet layer, outside the main style pipeline. background-position, background-repeat and background-size are emitted independently of whether the image reference resolves — deliberately, so the fit behaviour is conveyed regardless. objectFit: CONTAIN becomes background-size: contain; everything else, including absent, becomes cover. Loss: the source path is reduced to its basename, discarding any directory structure.

Figma key

Reads from fills (IMAGE paint). See ADR 063 — Image Content.

Decisions

  • ADR-063 — Image content — backgroundImage fill, an images registry, ImageProp, and ImageBinding
  • 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

Source

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