Children
The children data output of an element is either a plain array of child element names or — when the element is bound to a slot prop — a SlotBinding.
type Children = string[] | SlotBinding;
interface SlotBinding extends PropBinding { examples?: SlotContentRef[];}Because SlotBinding extends PropBinding, existing { $binding } values still validate — the slot variant simply adds an optional examples array.
string[]
The ordinary case: an ordered list of the element’s child element names.
children: - icon - labelSlotBinding
When an element’s children are driven by a slot prop, children is a PropBinding (a $binding JSON Pointer to the slot prop) optionally carrying authored example fills.
| Property | Type | Required | Description |
|---|---|---|---|
$binding | string | Yes | JSON Pointer to the slot prop (e.g. #/props/children) |
examples | SlotContentRef[] | No | Authored example fills for the slot |
Each examples[i] is a SlotContentRef pointing into a slotContentExamples registry or a Composition. Emitters currently write at most one entry — examples[0] is Figma’s authoring default for the slot layer — but the array shape leaves room for more.
children: $binding: "#/props/children" examples: - $slotContent: "#/components/dsAlert/slotContentExamples/dsAlert__children__default"examples is non-contractual reference material — parallel to StringProp.examples and NumberProp.examples. Code consumers handle missing slots through component logic and need not honor it.
Further Reading
- ADR 046 — Slots and Slot References
- defaultSlotContent (config) — emit captured default fills into
examples