Skip to content

Composition Variants

A run with spec.splitConcerns writes variants.yaml as its own file. CompositionVariantsDocument is that file’s type: it requires what the variants concern carries and permits nothing else — no title, no description, no anatomy.

A composition does not vary by prop configuration the way a component does — it has no props — so there is no default/variants layering here. elements and layout are the whole of its one, unvarying appearance.

Properties

PropertyTypeRequiredDescription
metadataMetadataYesMust set metadata.concern to variants
elementsElementsYesPer-element content, styles, and children
layoutLayoutYesThe composition’s layout tree

See Also