# Components and their location

**URL:** <https://community.penpot.app/t/components-and-their-location/485>\
**Category:** Ask the community\
**Tags:** design\
**Created:** [August 4, 2022, 12:54pm UTC](https://community.penpot.app/t/components-and-their-location/485 "2022-08-04T12:54:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vatron](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/vatron/32/423_2.png) [@vatron](https://community.penpot.app/u/vatron)\
**Post date:** [August 4, 2022, 12:54pm UTC](https://community.penpot.app/t/components-and-their-location/485/1 "2022-08-04T12:54:51Z")

</div>

Hi team,

so after setting up penpot locally what I am trying to achieve is I have made a component in one file and I want it to be enable to all the files to use that component instead of recreating them in each file.  
So if I could capture where is the component or its details stored like if in postgresql then I would write some code and make it available to all the files.

Can you tell me where’s the component part stored in database or the logic in code.  
Thanks & Regards

---

<div class="post-metadata">

**Author:** ![vatron](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/vatron/32/423_2.png) [@vatron](https://community.penpot.app/u/vatron)\
**Post date:** [August 5, 2022, 12:57pm UTC](https://community.penpot.app/t/components-and-their-location/485/2 "2022-08-05T12:57:45Z")

</div>

A reply from the penpot developers would really be appreciated !  
Trying some customisation here that could really be helpful!

---

<div class="post-metadata">

**Author:** ![niwinz](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/niwinz/32/122_2.png) [@niwinz](https://community.penpot.app/u/niwinz)\
**Post date:** [August 8, 2022, 11:30am UTC](https://community.penpot.app/t/components-and-their-location/485/3 "2022-08-08T11:30:43Z")

</div>

hello @vatron

The components are stored in the bytea blob on `data` column on `file` table. But you don’t need to touch here and you probably will not be able to do directly from postgresql.

To be able access to this component, you should mark a file as a shared library:

```sql
update file set is_shared=true where id = '<file-id-you-want-to-be-shared-as-library>';

```

Then you will need create relations between the library and the files witch you want to access this library:

```sql
insert into file_library_rel values ('<file-id>', 'file-library-id', now(), now());

```

I hope this helps you.

---

<div class="post-metadata">

**Author:** ![mairin](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/mairin/32/104_2.png) [@mairin](https://community.penpot.app/u/mairin)\
**Post date:** [August 9, 2022, 6:24pm UTC](https://community.penpot.app/t/components-and-their-location/485/4 "2022-08-09T18:24:09Z")

</div>

I don’t know if this is helpful, but how I achieve this is to simply copy component designs into a common file and then import that common file as a library in all the other files in the space. Any time the common file / library is updated, the individual files will automatically update.
