Component API
A run with spec.splitConcerns writes api.yaml as its own file rather than folding it into a single component document. ComponentApiDocument is that file’s type: it requires what the api concern carries and permits nothing else — no default block, no layout, no styles.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
metadata | Metadata | Yes | Must set metadata.concern to api |
title | string | Yes | Component name |
anatomy | Anatomy | Yes | Map of named elements that make up the component |
props | Props | Yes | Configurable input properties |
invalidPropCombinations | PropConfigurations[] | No | Prop combinations that are not valid together |
subcomponents | ComponentApiSubcomponent map | No | Embedded child component definitions, sliced to this concern — see Component |
See Also
- Component — the full
Componentshape and how it splits across concerns - Component Variants and Component Examples — the other two files
- Composition API — the equivalent
api.yamlcontract for a composition