Component Examples
A run with spec.splitConcerns writes examples.yaml as its own file. ComponentExamplesDocument is that file’s type: it requires only metadata — everything else in this file is optional, ready-made content rather than the structural contract api.yaml and variants.yaml carry.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
metadata | Metadata | Yes | Must set metadata.concern to examples |
slotContentExamples | Record<string, SlotContent> | No | Pro. Named slot-content fills, referenced by SlotContentRef |
instanceExamples | InstanceExamples | No | Pro. Documented whole-component usage examples |
images | Record<string, ImageData> | No | Registry of image data referenced by backgroundImage and image props |
subcomponents | ComponentExamplesSubcomponent map | No | Embedded child component definitions, sliced to this concern — see Component |
See Also
- Component — the full
Componentshape and how it splits across concerns - Instance Examples and Slot Content — the two content types this file holds
- Component API and Component Variants — the other two files
- Composition Examples — the equivalent
examples.yamlcontract for a composition