Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/metonym/svelte-healthicons
- Owner: metonym
- License: mit
- Created: 2021-09-11T15:24:17.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-31T18:36:02.000Z (over 1 year ago)
- Last Synced: 2024-08-09T18:21:36.925Z (3 months ago)
- Topics: healthicons, icon, icon-library, svelte, svelte-components
- Language: JavaScript
- Homepage: https://metonym.github.io/svelte-healthicons/
- Size: 5.35 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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