Skip to content

PropConfigurations

A flat map of prop names to the values they must hold for a condition to apply, or to the references and bindings that resolve their values at the call site.

type PropConfigurations = Record<
string,
string | number | boolean | null | PropBinding | CompositionRef | ImageBinding
>;
ArmWhere it appliesDescription
string | number | booleanAnywhere PropConfigurations is usedStatic scalar prop value
nullAnywhere PropConfigurations is used, under a nullable propThe prop is unset in this configuration (since 0.31.0)
PropBinding ({ $binding })Element.propConfigurations onlyPass-through binding to a parent prop
CompositionRef ({ $composition })Element.propConfigurations only, under a slot-prop keyJSON Pointer to a named Composition (in Component.slotContent or in an external composition file) used to fill a nested instance’s slot
ImageBinding ({ $binding, examples? })Element.propConfigurations only, under an image-prop keyForwards a parent image prop into a nested image instance’s source prop, carrying authoring-default example images (since 0.28.0)

InstanceExample.propConfigurations accepts scalars, null, and slot-content references — PropBinding is not permitted there.

Unset props

null means the prop is unset in this configuration. It is a value, not an absence, and the distinction matters because configurations layer:

  • an absent key inherits whatever the layer beneath it set
  • a null key overrides an inherited value with “no value”

A nullable prop is therefore fully described by its own key. Nothing beside it — a paired visibility flag, a producer extension — needs to be read to know whether the prop is set:

# The header slot is filled
header:
$slotContent: "#/components/card/slotContentExamples/cardHeader"
# The header slot is unset — this component shows no header
header: null

Usage

PropConfigurations appear in four places:

  • Variant configuration — declares which prop combination activates a variant. When all listed props match their specified values, the variant’s overrides are applied.
  • invalidPropCombinations — an array on the Component root (carried by the api concern) that declares prop combinations which should never occur together.
  • Element.propConfigurations — sets prop values on a nested instance element; accepts the full union (scalars, PropBinding, CompositionRef).
  • InstanceExample.propConfigurations — documents a complete configuration; scalars, null, and slot-content references.

Example

size: large
disabled: true

This configuration matches when the size prop equals "large" and the disabled prop is true.