Yet another Svelte wrapper for Heroicons.
This library differs from others in a couple main ways:
on:click
and so on;npm install -D @rgossiaux/svelte-heroicons
Heroicons contains two types of icons: outline and solid. They can be imported from @rgossiaux/svelte-heroicons/outline
and @rgossiaux/svelte-heroicons/solid
respectively.
All icon names are CamelCased and end with the word Icon
; for example, the academic-cap
icon on heroicons.com is imported as AcademicCapIcon
.
<script>
import { SelectorIcon } from "@rgossiaux/svelte-heroicons/solid";
import { CheckIcon } from "@rgossiaux/svelte-heroicons/outline";
</script>
<CheckIcon />
<SelectorIcon class="my-class" aria-hidden="true" />
See heroicons.com for the full list of icons.
As with the main Heroicons library, this library is MIT licensed.
All credit goes to Tailwind Labs for designing the icons and to the svg-to-svelte library for the tooling to wrap them as Svelte components.