SlotProp
Slot property definition — the component’s composable region: a prop a consumer fills with content rather than a scalar. A request for a component to be “composable”, or for content “consumers supply”, describes one of these. What it accepts is declared in its own anyOf member, and how many children it admits in minChildren and maxChildren.
Path
component-api:props.<prop>
Members
| Member | Type | Required | Description |
|---|---|---|---|
type | 'slot' | Yes | The discriminator — always 'slot'. |
default | null · string | No | Default slot content. |
nullable | boolean | No | Whether this slot prop accepts a null value. |
minChildren | integer | No | Minimum number of children this slot accepts |
maxChildren | integer | No | Maximum number of children this slot accepts |
anyOf | ComponentName[] | No | What this slot permits — the one list of its accepted content. |
defaultSlot | boolean | No | Whether this is the component’s designated default slot — the one slot an instance may fill by plain nesting instead of an explicit reference. |
$extensions | PropExtensions | No | Platform provenance under reverse-domain keys. |
Example
type: slotdefaultSlot: trueminChildren: 1maxChildren: 1anyOf: [$glyph, $text, badge]Constraints
Slot constraint members (minChildren, maxChildren, anyOf) are emitted when conventions.platforms.figma.slotConstraints is declared.
Platform bindings
Figma
Disposition: bound · Realised by: ComponentPropertyDefinitions (SLOT), plus slotSettings and preferredValues
Native SLOT properties read as type: slot. Under platforms.figma.slotConstraints, slotSettings and resolved preferredValues populate minChildren/maxChildren/anyOf (ADR-056). A primitive marker joins anyOf when a variant’s default content held a top-level $text/$glyph primitive and the platform reads slot primitives (ADR-102) — only ever joining an anyOf that already names a component. defaultSlot resolves once at generation from specs.slots.default.match, is refused when the prop is bound to anything but a container or slot element, and marks at most one prop (ADR-099). Render skips slot props — slot structure is rebuilt from the elements, not minted as a property.
CSS
Disposition: unsupported · Realised by: —
A slot is a place content goes. Its formatting travels on the slot element’s contentStyles, keyed by primitive kind — that styling is part of the styles surface above, not a mapping of the prop.
React
Disposition: bound · Realised by: children, or a named prop of React.ReactNode
Rules: slotsToChildren
A slot prop never reaches the platform-neutral contract — its type is the one part of a contract that cannot be platform-neutral, so each target spells its own. React spells the designated default slot as children and every other slot as a named React.ReactNode prop.
Web Components
Disposition: bound · Realised by: a native <slot> projection point
Rules: slotsToProjection
A slot prop never reaches the platform-neutral contract and never becomes a reactive property — it surfaces as a <slot>, whether or not it also accepts a primitive fill (a $text/$glyph marker widens what the slot can take, never turns it into a scalar property).
Decisions
- ADR-015 — Resolve
AnyProponeOfschema violation betweenTextPropandIconProp - ADR-019 — Allow null in StringProp.default
- ADR-022 — Add nullable support to SlotProp
- ADR-105 — Type–Schema Parity for Overlapping Prop Unions
- ADR-125 — Instance-example orientation
Rules
| Rule | Statement |
|---|---|
| DSPEC-12 | null is meaningful only under a nullable prop |
Source
| Format | File |
|---|---|
| JSON Schema | packages/schema/schema/component.schema.json |
| TypeScript | packages/schema/types/Props.ts |
| Specification | §4.2, §11 |