0.0.7 • Published 3 years ago
st-feather v0.0.7
Stencil Feather
Feather icons as StencilJS components.
Installation
There are three strategies we recommend for using web components built with Stencil.
Script tag
- 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
Node Modules
- 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
In a stencil-starter app
- 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
Usage
Icons can be used as web components, by prefixing the name of the icon with icon-
. See feathericons.com/ for a complete list of icons.
<icon-activity />
Any attributes will be forwarded to the feather svg icon.
<icon-activity stroke-width="1" color="red" />