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

https://github.com/metonym/svelte-stacks-icons

Stack Overflow Stacks SVG icons as Svelte components
https://github.com/metonym/svelte-stacks-icons

icon-library icons stack-overflow stacks svelte svelte-components

Last synced: 3 months ago
JSON representation

Stack Overflow Stacks SVG icons as Svelte components

Awesome Lists containing this project

README

        

# svelte-stacks-icons

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

> [Stack Overflow Stacks SVG icons](https://github.com/StackExchange/Stacks-Icons) as Svelte components.

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

---

## Installation

```sh
# Yarn
yarn add -D svelte-stacks-icons

# npm
npm i -D svelte-stacks-icons

# pnpm
pnpm i -D svelte-stacks-icons
```

## Usage

### Basic

```svelte

import { Alert, Calendar, Eye } from "svelte-stacks-icons";

```

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.

```svelte no-eval

import School from "svelte-stacks-icons/lib/School.svelte";

```

## Using `svelte:component`

```svelte

import * as icons from "svelte-stacks-icons";

{#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)

## License

[MIT](LICENSE)

[npm]: https://img.shields.io/npm/v/svelte-stacks-icons.svg?color=%23f48225&style=for-the-badge
[npm-url]: https://npmjs.com/package/svelte-stacks-icons