The <Slot>
component takes a MakeswiftComponentSnapshot
(returned from calling getComponentSnapshot) and renders either a fallback or an editable slot.
If fallback
is not provided, it will be set to null
by default. In
this case, the user will not be able to see the element in the Canvas,
but they will be able to select it from the Elements Panel.
One good use case for this default is with Dynamic
Routes;
for example, product detail pages. If the route renders many pages, it
might be unreasonable to expect the user to visually edit each one
before publishing. Because the null
default will not show any content
until the user opts in, the user could publish the site without
affecting any visual content. They could then update and publish
individual pages as they are ready.
<Slot>
component will render its fallback by default until the user opts in to visual editing. Visually, this component provides a checkbox property that allows the user to toggle between displaying the fallback and the editable slot itself, including any user generated content within it.
<Slot>
component.