Prepend (Beta)
Prepend (Beta)
slot.prepend(component)
Add a component instance as the first child of the slot.
Only component instances can be added to slots. Components from installed libraries are not supported; only components in the site’s own component library can be added to a slot. This action is undoable via the Designer’s undo stack.
Beta
These methods are in public beta and may change with future releases.
Syntax
Parameters
- component: Component — The component definition to instantiate and insert at the beginning of the slot.
Returns
Promise<null>
A Promise that resolves when the component instance is added.