2.0.2 • Published 2 years ago

svelte-heroicons-component v2.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Svelte Heroicons Component

Heroicons component for Svelte. Support Heroicons v1 and v2. Available props are: className, size, strokeWidth, and fill(solid icon only). You can also add on:click event.

Installing

npm install -D svelte-heroicons-component

Usage

/*
Check the name of icons from https://heroicons.com/ or https://v1.heroicons.com/.

To use heroicons home just import the HomeIcon component. If you want to use a solid icon import HomeSolidIcon.
*/
import { HomeIcon, HomeSolidIcon} from 'svelte-heroicons-component'


<HomeIcon />
<HomeSolidIcon />
// to add click event you can do like this
<HomeIcon on:click={callFunction} />

<HomeSolidIcon on:click={callFunction} />
// to add class name
<HomeIcon className="hidden lg:block" />
// default size is 1.5rem but you can customized the size like this example bellow
<HomeIcon size="10px" />
<HomeIcon size="20pt" />
<HomeIcon size="3em" />
<HomeIcon size="2rem" />
<HomeIcon size="4" /> # "The default unit size is rem, so this will be 4rem"
// If you use tailwindcss the classname w-* will override the size value
<HomeIcon size="4rem" className="w-6 h-6 xl:w-8 h-8" />
// the default strokewidth is 2 but you can change like this. Props strokeWidth only exists in outline icons
<HomeIcon strokeWidth="5" />
// If you use tailwindcss the classname stroke-* will override the strokeWidth value
<HomeIcon strokeWidth="5" className="stroke-2" />
// If you want to fill the color you can do like this. Props fill only exists in outline icons
<HomeIcon fill="#87CEEB" />

Available Icons: https://heroicons.com https://v1.heroicons.com/

Note: Add Icon to the end of component name (e.g., AcademicCapIcon) . For solid icon add SolicIcon to the end of component name (e.g., AcademicCapSolidIcon).
2.0.2

2 years ago

2.0.1

2 years ago

1.2.0

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

2.0.0

3 years ago

1.1.1

3 years ago

1.0.2

3 years ago

1.0.19

3 years ago

1.1.0

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.1-f

3 years ago

0.0.1-e

3 years ago

0.0.1-d

3 years ago

0.0.1-c

3 years ago

0.0.1-b

3 years ago

0.0.1-a

3 years ago

0.0.1

3 years ago