ImageProp
Image property definition for a prop a consumer fills with an image — a registry reference or an external source.
Path
component-api:props.<prop>
Members
| Member | Type | Required | Description |
|---|---|---|---|
type | 'image' | Yes | The discriminator — always 'image'. |
default | string · null | No | Default image — an images registry reference, or null. |
nullable | boolean | No | Whether this prop accepts a null value. |
examples | ImageValue[] | No | Authoring-default example images for this prop — the image the component was authored with. |
$extensions | PropExtensions | No | Platform provenance under reverse-domain keys. |
Example
type: imagedefault: "#/images/avatarPlaceholder"nullable: trueWhere an authoring default lives
An authoring-default image sits in one of two places, and they describe different things:
| Location | Describes |
|---|---|
ImageBinding.examples | The image at that binding site — how one consumer placed it |
ImageProp.examples | The image the component itself was authored with |
Where both apply to one rendered instance, the binding is the more specific statement. A designated image component is the origin of an image rather than a consumer of one, so it has no binding site in its own spec — examples on the prop is its only home for this.
examples is non-contractual reference material, parallel to StringProp.examples, and is distinct from default: a default states what the prop resolves to when a consumer omits it, while examples only demonstrate typical content.
props: imageSource: type: image examples: - $image: "#/components/dsImage/images/dsImage__image"Platform bindings
Figma
Disposition: bound · Realised by: code-only container layer named in figma.images.sourceProps“
Rules: codeOnlyProps
An image prop has no native Figma property type; it is read from a code-only layer (ADR-063) and carries authoring-default images in examples (ADR-088). Render mints the hidden layer back.
CSS
Disposition: unsupported · Realised by: —
An image prop is content; the backgroundImage style key is the styling surface, and a bound image reaches it as a custom property the emitting platform writes.
React
Disposition: bound · Realised by: a nullable string URL member of the Props interface
An image registry pointer resolves to a served asset URL at emit. A bound prop carrying an authoring-default example (ADR-088) emits the example as the fallback — p.src ?? "<url>" — because composed content is static and without it the child falls back to its own default artwork.
Web Components
Disposition: bound · Realised by: a URL-valued property
Registry pointers resolve to served asset URLs under the emitted assets base, from the registry entry’s own src — an entry without one is unresolved and nothing further is tried (ADR-063).
Decisions
- ADR-015 — Resolve
AnyProponeOfschema violation betweenTextPropandIconProp - ADR-019 — Allow null in StringProp.default
- ADR-063 — Image content —
backgroundImagefill, animagesregistry,ImageProp, andImageBinding - ADR-088 — Authoring-default images on
ImageProp - ADR-105 — Type–Schema Parity for Overlapping Prop Unions
- ADR-125 — Instance-example orientation
Rules
| Rule | Statement |
|---|---|
| DSPEC-12 | null is meaningful only under a nullable prop |
Source
| Format | File |
|---|---|
| JSON Schema | packages/schema/schema/component.schema.json |
| TypeScript | packages/schema/types/Image.ts |
| Specification | §4.2, §11 |