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.
| Operand | From |
|---|---|
prop.defaultSlot | spec document (ADR-099) |
prop.key | spec document — kebab-cased for the attribute |
Cases
Ordered — first match wins.
| # | When | Emits | Why |
|---|---|---|---|
| 1 | prop.defaultSlot = true | an unnamed <slot> — the component’s bare light DOM projects here | The authored defaultSlot is the only answer, by whatever prop name it carries; a prop’s spelling never nominates a default slot |
| 2 | prop.key present | <slot name="<kebab>"> — including a slot whose prop happens to be spelled children | A 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.