Feather icons as StencilJS components.
There are three strategies we recommend for using web components built with Stencil.
- Put a script tag similar to this
<script src='https://unpkg.com/st-feather@latest/dist/st-feather/st-feather.esm.js'></script>
in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc
- Run
npm install st-feather --save
- Put a script tag similar to this
<script src='node_modules/st-feather/dist/st-feather/st-feather.esm.js'></script>
in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc
- Run
npm install st-feather --save
- Add an import to the npm packages
import st-feather;
- Then you can use the element anywhere in your template, JSX, html etc
Icons can be used as web components, by prefixing the name of the icon with icon-
. See lucide.dev for a complete list of icons.
<icon-activity />
Any attributes will be forwarded to the lucide svg icon.
<icon-activity stroke-width="1" color="red" />