5.2.0 B1 – Dropzones for Slots?

Should there be a drop zone for component slots within the builder itself?

e.g. I set up a row as a Component, with the column on the right set up as a slot.

But in the page builder, the empty space is collapsed. And I have to click down into the inspector to be able to add an element.

1 Like

Actually, some additional funkiness for slots.

If I have a component in a column (like the first column in my example above), but then I make that column a slot, the content of the column is ignored in the builder. (i.e. see there’s no longer the headline appearing)

I was kind of wondering if setting a column as a slot, but then still including elements within it, would allow you to add additional elements to that slot when necessary – but otherwise keep the layout intact.

Confirmed. Yes, those should be showing dropzones. Definitely something wrong there, sorry about that.

To confirm, once you make an element a Slot, its children in the component builder will be ignored when the component is used in the page builder. This is so you can build with some kind of sample content in the Component builder to take up that space.

A good way to get the best of both worlds is something like this:

  1. Create a Component Set for low level components like Buttons/Headings etc. Let’s say we have one called “Button”
  2. Create another Component set for compositions that are bigger arrangements of elements. Let’s say we have a Section exported with the name “Top Level”
  3. Drag in your Button component (from the other set) anywhere inside Top Level.
  4. With that Component instance selected, toggle “Pass Through” from the element manager.

When you use Top Level in a page, you’ll get something like this screenshot:
Screen Shot 2022-02-21 at 2.58.49 PM

The Button will be like a virtual child that can be individually inspected and edited. It can’t be deleted or duplicated because it is hardwired into “Top Level”.

Once that’s in place, you can add a Div or Column as a Slot to expose the a dropzone to use as well.

2 Likes

Wanted to note here this one is still not working fully in beta2. The outline and front end are working but the slot elements still don’t preview correctly.

1 Like