Skip to content

slot

A hole the consumer fills, rather than content the spec fixes.

Path

component-api:anatomy.<element>.type: slot

Styles

Written on the element, not this anatomy entry — under a variant, slot content, or a composition. The style keys an element of this type may carry:

aspectRatio · backgroundColor · backgroundImage · bottom · centerHorizontalOffset · centerVerticalOffset · clipsContent · cornerRadius · cornerSmoothing · crossAxisAlignment · effects · end · gridColumns · gridRows · height · itemReverseZIndex · itemSpacing · layoutMode · layoutSizingHorizontal · layoutSizingVertical · locked · mainAxisAlignment · maxHeight · maxWidth · minHeight · minWidth · opacity · padding · position · primaryAxisSizingMode · rotation · start · strokeAlign · strokeDashPattern · strokeWeight · strokes · top · visible · width · wrap · wrapAlignment

Themes

Selected on the element, not this anatomy entry. Any element may select a theme for a token group, or inherit one from the nearest ancestor — deciding what its subtree’s token references resolve to.

Platform bindings

Figma

Disposition: bound · Realised by: SLOT node

Native slot nodes. The prop side of the same fact — constraints, markers, the default slot — is the props surface’s slot kind; the element side carries contentStyles keyed by the primitive markers its prop’s anyOf names (ADR-102).

CSS

Disposition: bound · Realised by: Css, contentStyles

Rules: elementSelectors — with text, glyph, vector, container, instance, line, ellipse, rectangle

The slot element’s own styles emit as any element’s do. Its contentStyles — formatting for primitive fills, keyed by the $text/$glyph markers — emit as additional blocks scoped to the primitive content (ADR-102).

React

Disposition: bound · Realised by: the fill render site — children for the default slot, the named prop otherwise

Rules: layoutWalk — with container, text, glyph, instance

The element side of the props surface’s slot kind: the element’s place in the tree is where the fill renders, and its contentStyles style a primitive fill.

Web Components

Disposition: bound · Realised by: a native <slot> — unnamed for the declared default slot, name="<kebab>" otherwise

Rules: layoutWalk — with container, text, glyph, instance

The element side of the props surface’s slotsToProjection rule. A collapsed slot wrapper (ADR-083) carries the children binding on a container root and still projects.

Decisions

  • ADR-083 — Collapsing a Slot-Only Wrapper
  • ADR-122 — Layout Grid — layoutMode: GRID and a Single Templated Axis

Source

FormatFile
JSON Schemapackages/schema/schema/component.schema.json
TypeScriptpackages/schema/types/Element.ts
Specification§2, §11