# Is it possible to have container components?

**URL:** <https://community.penpot.app/t/is-it-possible-to-have-container-components/5406>\
**Category:** Ask the community\
**Created:** [May 14, 2024, 1:57pm UTC](https://community.penpot.app/t/is-it-possible-to-have-container-components/5406 "2024-05-14T13:57:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tko](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@tko](https://community.penpot.app/u/tko)\
**Post date:** [May 14, 2024, 1:57pm UTC](https://community.penpot.app/t/is-it-possible-to-have-container-components/5406/1 "2024-05-14T13:57:24Z")

</div>

I’m a SW developer, so I don’t know, if my question makes sense from a design perspective…  
I try to design a UI for some application where some information is shown as cards. Thus, i created components for the different types of cards I want to support and show.  
As there will be an overview of the available cards, I also created a container-component (dashboard) to arrange several cards. To hold the cards, I added a board element with a flex layout (content-board).  
When I now add cards to that content-board, they are arranged according to the flex-layout parameters given.

When I now register the container component (it’s planned to have that in different views) with an empty content-board as a penpot-component (v2), it gets visible in the assets list, and I can create instances in my design - but I can no longer add any components (esp. the card-components) to the content board of the instances of the container-component. When I add them, they get placed hierarchically parallel to the dashboard component and thus do not get automatically arranged by the flex-layout of the content-board.

The current solution, I see, is to cover only the static parts as components (e.g. dashboard-header), but create all the container-elements (boards) as individual boards in the main design and assure consoistent parameter settings manually…

Does any one have a suggestion? (Maybe I miss some feature of penpot…)

Thanks in advance!

Thomas

---

<div class="post-metadata">

**Author:** ![claragv](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/claragv/32/45_2.png) [@claragv](https://community.penpot.app/u/claragv)\
**Post date:** [May 16, 2024, 10:14am UTC](https://community.penpot.app/t/is-it-possible-to-have-container-components/5406/2 "2024-05-16T10:14:26Z")

</div>

Hi tko! you can have a container component, creating an empty grid layout board with the layout that you want, and making it a component. After that you can place inside the grid whatever you want 🙂

Hope that helps you!

C.

---

<div class="post-metadata">

**Author:** ![tko](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@tko](https://community.penpot.app/u/tko)\
**Post date:** [May 17, 2024, 10:07am UTC](https://community.penpot.app/t/is-it-possible-to-have-container-components/5406/3 "2024-05-17T10:07:59Z")

</div>

Hi claragv, many thanks for your reply!  
I tested it, and it allows me to add anything to the main component’s grid which then of course affects all instances. (This is the same, I already had with the empty flex-layout board, but of course with a grid-layout)  
In my design the same container component should be used to show different collections. Thus, I would like to add different elements to the different instances of the component:  
E.g. container A shows a list of person-cards, while container B shows a list of device cards, but both containers are of the same kind/design (same headers, same layout requirements)…

Thanks

Thomas

---

<div class="post-metadata">

**Author:** ![ArchiA](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/archia/32/4007_2.png) [@ArchiA](https://community.penpot.app/u/ArchiA)\
**Post date:** [May 22, 2024, 11:50am UTC](https://community.penpot.app/t/is-it-possible-to-have-container-components/5406/4 "2024-05-22T11:50:22Z")

</div>

I do it in a dirty way. Right Click on the component \> Detach instance.  
[Official Penpot Tutorial](https://youtu.be/uSRsu19J_Fo?list=PLgcCPfOv5v54UQcp2ggMdA44SQppr8P6k&t=47)

---

<div class="post-metadata">

**Author:** ![henri9813](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/henri9813/32/5211_2.png) [@henri9813](https://community.penpot.app/u/henri9813)\
**Post date:** [May 26, 2024, 12:08pm UTC](https://community.penpot.app/t/is-it-possible-to-have-container-components/5406/5 "2024-05-26T12:08:07Z")

</div>

Hello @claragv , I tried, but it doesn’t works.

I opened an issue on GitHub: [feature: permit to add objects into a instanced component · Issue #4631 · penpot/penpot · GitHub](https://github.com/penpot/penpot/issues/4631)

Best regards
