# Use packages in custom components?

**URL:** <https://community.weweb.io/t/use-packages-in-custom-components/1361>\
**Category:** Developer corner\
**Created:** [October 26, 2022, 3:51pm UTC](https://community.weweb.io/t/use-packages-in-custom-components/1361 "2022-10-26T15:51:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbkbdigital](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@sbkbdigital](https://community.weweb.io/u/sbkbdigital)\
**Post date:** [October 26, 2022, 3:51pm UTC](https://community.weweb.io/t/use-packages-in-custom-components/1361/1 "2022-10-26T15:51:42Z")

</div>

I tried using a simple icons library in the starter ww custom component, and it didn’t work. Am I missing something, or is this not possible (i.e. using packages in custom components)?  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/d/d1f1b98a30e85155032f387566bdc7ad0e589bc2.png)

---

<div class="post-metadata">

**Author:** ![aurelie](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/aurelie/32/13249_2.png) [@aurelie](https://community.weweb.io/u/aurelie)\
**Post date:** [October 27, 2022, 10:20am UTC](https://community.weweb.io/t/use-packages-in-custom-components/1361/2 "2022-10-27T10:20:15Z")

</div>

Hi,  
did you

- Add the dependency in package.json ?
- Declare the component in the components property of your element?

---

<div class="post-metadata">

**Author:** ![sbkbdigital](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@sbkbdigital](https://community.weweb.io/u/sbkbdigital)\
**Post date:** [October 27, 2022, 8:20pm UTC](https://community.weweb.io/t/use-packages-in-custom-components/1361/3 "2022-10-27T20:20:49Z")

</div>

I had added it to package.json but had not declared it. Once I did, it worked. Noob problem 🙂.

Thanks!
