It might be useful when you want to show different content based on components being added to the slot or not. The code below takes into account that Uniform Canvas editor mode adds an empty placeholder component when no components are in the slot:
For page router, you could pass the actual slot, for the app router, you’d access the component?.slots
You can define wrapper for your slot, i.e. how you want it to render.
Page router has the wrapperComponet attribute. App router just accept the same as a child component.
Uniform Canvas editor mode adds an empty placeholder component when no components are in the slot. Check this documentation on how to customize it: