Skip to content

slotsToProjection

disposition: bound, direction: spec-to-code, basis: implementation

A prop rule of the Web Components binding. The kinds named below resolve jointly here — which kind a prop even is, or what platform shape it takes, is decided by this rule rather than per kind.

Keys. slot

Operands

Every fact the rule reads. Nothing outside this set participates.

OperandFrom
prop.defaultSlotspec document (ADR-099)
prop.keyspec document — kebab-cased for the attribute

Cases

Ordered — first match wins.

#WhenEmitsWhy
1prop.defaultSlot = truean unnamed <slot> — the component’s bare light DOM projects hereThe authored defaultSlot is the only answer, by whatever prop name it carries; a prop’s spelling never nominates a default slot
2prop.key present<slot name="<kebab>"> — including a slot whose prop happens to be spelled childrenA component declaring no default slot has no unnamed <slot> at all

Otherwise

Nothing is emitted. — A prop that is not a slot projects nothing

A primitive-accepting slot keeps its <slot> exactly like any other, empty included — the string default a $text slot records is example content, not something the component renders on its own. A collapsed slot wrapper (ADR-083) puts the children binding on a container root, which still projects. An unfilled slot is marked so the shared stylesheet collapses the gap a flex parent would otherwise paint around nothing.