feathericons / feather

Simply beautiful open-source icons
https://feathericons.com
MIT License
24.65k stars 1.21k forks source link

NPM package does not support shadow DOM #1168

Open jrtcppv opened 1 year ago

jrtcppv commented 1 year ago

I am trying to use the feather.replace function in a custom element but because it selects elements from document it does not find anything to replace. Would it be possible to export feather.replaceElement as well as feather.replace so that I can replace the elements from a query on the shadow DOM?

patrickmathia commented 11 months ago

I'm creating a Lit.js project and I'm having the same issue. We'd be glad to have feedback about how to solve it.

Trying to find a solution to use it with Lit I found this library that turns feather icons into web components that can be called anywhere after running the script, it solved my problem.