Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

Pinterest Gestalt SVG icons as Svelte components
https://github.com/metonym/svelte-gestalt-icons

gestalt icon icon-library svelte svelte-component svelte-components svg typescript-definitions

Last synced: 26 days ago
JSON representation

Pinterest Gestalt SVG icons as Svelte components

Awesome Lists containing this project

README

        

# svelte-gestalt-icons

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

> [Pinterest Gestalt SVG icons](https://github.com/pinterest/gestalt/tree/master/packages/gestalt/src/icons) as Svelte components.

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

---

## Installation

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

# npm
npm i -D svelte-gestalt-icons

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

## Usage

### Basic

```svelte

import { Add, Sound, Tag, History } from "svelte-gestalt-icons";

```

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

### Direct import (recommended)

Import the icon directly for faster compiling during development.

```html

import Add from "svelte-gestalt-icons/lib/Add.svelte";

```

## Using `svelte:component`

```svelte

import * as icons from "svelte-gestalt-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-gestalt-icons.svg?color=%230a6955&style=for-the-badge
[npm-url]: https://npmjs.com/package/svelte-gestalt-icons