Structureless / Layout components

How can I create a generic structureless component, that can accept any number of children?

Let’s say I want to create a reusable layout, with specific spacing. For example - Actions component for buttons. This is always a Flex Row, with vertical spacing of 12, and Justify Content End. Clearly this component shouldn’t have any children, and should allow any number of children in its instances.

I can create a board and turn it into a component to get an empty component. However I can’t add anything to its instances, as Penpot AFAIS disallows component instances to have dynamic structure.

Is there perhaps a different abstraction that I should use for this purpose?

I suspect this may not be possible at the moment.

What we do is to add the container component and use Detach Instance on it, in order to be able to add more elements.

2 Likes