Composition Examples
A run with spec.splitConcerns writes examples.yaml as its own file, and only when the composition has any named slot fills bundled alongside its primary content. CompositionExamplesDocument is that file’s type: it requires only metadata — slotContent is optional, since not every composition has one.
A composition has no instanceExamples and no images registry of its own — those are api/examples-concern fields on ComponentExamplesDocument that a composition has nothing to hold.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
metadata | Metadata | Yes | Must set metadata.concern to examples |
slotContent | Record<string, SlotContent> | No | Named slot fills bundled alongside this composition’s primary content |
See Also
- Composition — the full
Compositionshape and how it splits across concerns - Slot Content — the content type this file holds
- Composition API and Composition Variants — the other two files
- Component Examples — the equivalent
examples.yamlcontract for a component