ionicons icon indicating copy to clipboard operation
ionicons copied to clipboard

Documentation for distributed custom elements in README

Open YoungElPaso opened this issue 3 years ago • 0 comments

I noticed that quite a few people are looking (like me) to use the web component/custom element <ion-icon> in their own projects without resorting to the CDN.

I would like to import the code for the component into my project directly from the NPM package, whether it be a React, Svelte or Lit or plain JS project and while I've figured out how to do this by using the distributed component (which it seems has been distributed since before 5.0.0 - see 66556ea) this feature isn't well documented. The commit I just referenced has some nice documentation on how to do this, but this seems like it should be in the README file or somewhere else more prominent.

Having a distributed, shareable WC seems like one of the greatest strengths of this project, it's a shame using it is less well advertised. A few lines, similar to what is in the commit that implemented this feature would be really great, as well as a link to a Stackblitz or other online IDE/playground/REPL or demo for perhaps a few popular frameworks.

Since I've done the work of importing Ionicons into a Svelte Web Component Stackblitz demo, I'd be happy to contribute a PR with that and some rudimentary documentation if other people are interested.

YoungElPaso avatar Jan 28 '22 16:01 YoungElPaso