Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/metonym/svelte-healthicons

Healthicons SVG icons as Svelte components
https://github.com/metonym/svelte-healthicons

healthicons icon icon-library svelte svelte-components

Last synced: 26 days ago
JSON representation

Healthicons SVG icons as Svelte components

Awesome Lists containing this project

README

        

# svelte-healthicons

[![NPM][npm]][npm-url]

> [Healthicons SVG icons](https://github.com/resolvetosavelives/healthicons) as Svelte components.

Try it in the [Svelte REPL](https://svelte.dev/repl/5fff97c2932a4467a6e94f2b6baee561).

---

## Installation

**Yarn**

```bash
yarn add -D svelte-healthicons
```

**NPM**

```bash
npm i -D svelte-healthicons
```

**pnpm**

```bash
pnpm i -D svelte-healthicons
```

## Usage

### Basic

```svelte

import {
FilledBodyArm,
NegativeBodyEnzyme,
OutlineDevicesMicroscope,
} from "svelte-healthicons";

```

Refer to [ICON_INDEX.md](ICON_INDEX.md) for a list of supported icons.

### Direct import

Use the direct import for faster compiling during development.

**Note:** even if using base imports, unused imports are still tree shakeable by application bundlers like Rollup or webpack.

```html

import Arm from "svelte-healthicons/lib/Arm.svelte";

```

## Using `svelte:component`

```svelte

import * as icons from "svelte-healthicons";

{#each Object.entries(icons) as [icon, component]}



{icon}

{/each}
```

## TypeScript

Svelte version 3.31 or greater is required to use this library with TypeScript.

## [Changelog](CHANGELOG.md)

## Developing this library

Currently, `healthicons` is not published to the NPM registry. We do the following to build the library:

1. Execute `build.sh` which downloads `svg` icons from `https://github.com/resolvetosavelives/healthicons/public/icons/svg` to `node_modules/healthicons`
2. Run `build.js` which uses `svelvg` to create a Svelte component library

## License

[MIT](LICENSE)

[npm]: https://img.shields.io/npm/v/svelte-healthicons.svg?color=%236566ff&style=for-the-badge
[npm-url]: https://npmjs.com/package/svelte-healthicons