Slots (Beta)

The slot instance element represents a slot within a component instance. Slots define areas within a component where instance-level child content can be placed. Each slot accepts only component instances as children, not arbitrary elements.

To get slot instance elements, use element.getSlots() on a ComponentInstance element.

Beta

These methods are in public beta and may change with future releases.

Methods

Currently you can add components as children of slots programmatically but not remove them.

Properties

PropertyDescriptionTypeExample
idUnique identifier for the element composed of two identifiers, the component and the element.object{component: "64c813...", element: "5edf8e59-71f9..."}
typeSpecifies the type of the element.string"SlotInstance"
childrenWhether the element supports the standard children API.booleanfalse
customAttributesWhether the element can have custom attributes.booleanfalse
stylesWhether the element can contain styles.booleanfalse
textContentWhether the element can contain text content.booleanfalse