2.0.2 • Published 8 months ago

svelte-heroicons-component v2.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months 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

8 months ago

2.0.1

1 year ago

1.2.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

2.0.0

2 years ago

1.1.1

2 years ago

1.0.2

2 years ago

1.0.19

2 years ago

1.1.0

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.1-f

2 years ago

0.0.1-e

2 years ago

0.0.1-d

2 years ago

0.0.1-c

2 years ago

0.0.1-b

2 years ago

0.0.1-a

2 years ago

0.0.1

2 years ago