svelte-feathericons Svelte Themes

Svelte Feathericons

Icon component for Svelte using Feathericons.

svelte-feathericons

Customizable Svelte component using Feather icons.

Install

$ npm i svelte-feathericons

or, if you use Yarn:

yarn add svelte-feathericons

Usage

<script>
  import Icon from "svelte-feathericons/Icon.svelte"
</script>

<Icon name="Airplay"/>

It is possible to set custom values for the following SVG attributes: class, width, height, fill, stroke and stroke-width.

For example:

<script>
  import Icon from "svelte-feathericons/Icon.svelte"
</script>

<Icon name="Plus" width="16" height="16" stroke="blue"/>

Building

In order to build the components locally (when a new version of Feather icons is released for example), proceed as follows:

Clone the repository and install the dependencies:

$ git clone https://github.com/mokhito/svelte-feathericons.git
$ cd svelte-feathericons

Run the build script:

$ npm run build

or with Yarn:

$ yarn build

Top categories

Loading Svelte Themes