Composition API
A run with spec.splitConcerns writes api.yaml as its own file. CompositionApiDocument is that file’s type: it requires what the api concern carries and permits nothing else — no elements, no layout, no slotContent.
A composition has no props, so this document carries no invalidPropCombinations and no subcomponents either — both are api-concern fields on ComponentApiDocument that a composition has nothing to hold.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
metadata | Metadata | Yes | Must set metadata.concern to api |
title | string | No | Human-readable label for the composition |
description | string | No | Purpose and usage notes for documentation tooling |
anatomy | Anatomy | Yes | Map of named elements that make up the composition |
See Also
- Composition — the full
Compositionshape and how it splits across concerns - Composition Variants and Composition Examples — the other two files
- Component API — the equivalent
api.yamlcontract for a component