Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/krowten/svelte-heroicons

Heroicons for SvelteKit
https://github.com/krowten/svelte-heroicons

Last synced: 3 months ago
JSON representation

Heroicons for SvelteKit

Awesome Lists containing this project

README

        

## Description

[heroicons](https://heroicons.com) for Svelte

See all available icons here: https://krowten.github.io/svelte-heroicons

## Basic Usage

_Note that this library currently only supports Svelte 3+ / SvelteKit._

First, install `svelte-heroicons` from npm:

```sh
npm install --save @krowten/svelte-heroicons
```

Сomponent can be used directly:

```svelte

import Icon from '@krowten/svelte-heroicons/Icon.svelte';





```

or each icon can be imported individually as a Svelte component:

```svelte

import { BeakerIcon } from '@krowten/svelte-heroicons';
// or import BeakerIcon from '@krowten/svelte-heroicons/icons/BeakerIcon.svelte';





```

Both icon styles are preconfigured to be stylable by setting the `color` CSS property, either manually or using utility classes like `text-gray-500` in a framework like [Tailwind CSS](https://tailwindcss.com).