Accept embedded view in custom component

I am trying to create a library of custom components, however, I cant seem to find out how to create my own components that takes a view or component as a child. Like creating a custom embedded view component.

And to follow up that question. Is it possible to embed a component directly or do you need to place it in a view first?

Just leaving a comment cuz i have tried to do this before too but was unable to make a container component work.

It has something to do with ContainerDesignDelegate, i was able to create the component, but it didnt behave like a container at all so i gave up on that and used a different method for the thing i wanted to do...

Basically the extent of what I know: