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
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: COVERnull (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 —
backgroundImagefill, animagesregistry,ImageProp, andImageBinding - ADR-113 — Style defaults belong to the schema
Rules
| Rule | Statement |
|---|---|
| DSPEC-44 | Every property of Styles declares a default, and its value validates against that property’s own schema |
| DSPEC-45 | A declared default is a literal, never a TokenReference, PropBinding or Conditional |
Source
| Format | File |
|---|---|
| JSON Schema | packages/schema/schema/styles.schema.json |
| TypeScript | packages/schema/types/Styles.ts |
| Specification | §4.1a, §11 |