Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metonym/svelte-polaris-icons
Shopify Polaris SVG icons as Svelte components
https://github.com/metonym/svelte-polaris-icons
icons polaris shopify shopify-polaris svelte svelte-component svg
Last synced: 26 days ago
JSON representation
Shopify Polaris SVG icons as Svelte components
- Host: GitHub
- URL: https://github.com/metonym/svelte-polaris-icons
- Owner: metonym
- License: mit
- Created: 2020-04-27T23:49:11.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-02T18:00:59.000Z (about 2 years ago)
- Last Synced: 2024-10-05T13:07:46.967Z (about 1 month ago)
- Topics: icons, polaris, shopify, shopify-polaris, svelte, svelte-component, svg
- Language: Svelte
- Homepage: https://metonym.github.io/svelte-polaris-icons/
- Size: 555 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# svelte-polaris-icons
[![NPM][npm]][npm-url]
> Shopify Polaris SVG icons as Svelte components.
This library builds icons from [Shopify Polaris](https://polaris-icons.shopify.com/) as Svelte components with zero dependencies.
Try it in the [Svelte REPL](https://svelte.dev/repl/52cb5e5d624b4f2cbb60a110b76161f0).
---
## Installation
```bash
# Yarn
yarn add -D svelte-polaris-icons# NPM
npm i -D svelte-polaris-icons# pnpm
pnpm i -D svelte-polaris-icons
```## Usage
Refer to [ICON_INDEX.md](./ICON_INDEX.md) for a list of available icons.
### Base import
```svelte
import {
AddMajor,
ArrowUpMinor,
MobilePlusMajor,
StoreMinor,
} from "svelte-polaris-icons";```
### Direct import
The direct import method is recommended because it can lead to faster compile times.
```html
import ExportMinor from "svelte-polaris-icons/lib/ExportMinor.svelte";
```
## Using `svelte:component`
```svelte
import * as Icons from "svelte-polaris-icons";
{#each Object.keys(Icons) as icon}
{icon}
{/each}
```## TypeScript
Svelte version 3.31 or greater is required to use this library with TypeScript.
## Changelog
[Changelog](CHANGELOG.md)
## License
[MIT](LICENSE)
[npm]: https://img.shields.io/npm/v/svelte-polaris-icons.svg?color=%23ff3e00&style=for-the-badge
[npm-url]: https://npmjs.com/package/svelte-polaris-icons