2.0.1 • Published 9 months ago
iconly v2.0.1
1.5kB gzipped
Demo
➤ Install
$ yarn add iconly➤ Import
import Iconly from 'iconly';➤ Usage
const iconly = new Iconly({
file: './sprite.svg',
version: '1.0',
debug: true,
});
iconly.init().then(() => console.log('Iconly is initialized and icons are loaded.'));<svg>
<use href="#icon-name"></use>
</svg>File with icons
<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" fill="none">
<symbol id="icon-name" viewBox="0 0 300 300">
<path ... />
</symbol>
...
</svg>➤ Options
| Option | Type | Default | Description |
|---|---|---|---|
file | string | './icons.svg' | The URL of the SVG file containing the icons. |
version | string | '1.0' | The version of the icon set. |
debug | boolean | false | If true, debug information and errors will be logged to the console. |
container | string \| HTMLElement | document.body | The container element where the icons will be injected. Can be a CSS selector string or an HTMLElement. |
➤ License
iconly is released under MIT license
2.0.1-dev.0
9 months ago
2.0.1
9 months ago
2.0.0
9 months ago
1.5.2-dev.1
9 months ago
1.5.2-dev.5
9 months ago
1.5.2-dev.4
9 months ago
1.5.2-dev.3
9 months ago
1.5.2-dev.2
9 months ago
1.5.2-dev.8
9 months ago
1.5.2-dev.7
9 months ago
1.4.4
2 years ago
1.5.1
2 years ago
1.5.0
2 years ago
1.4.3
2 years ago
1.4.2
2 years ago
1.4.1
2 years ago
1.4.0
2 years ago
1.3.0
2 years ago
1.2.2
2 years ago
1.2.0
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.0
2 years ago
1.2.1
2 years ago
0.0.1
3 years ago
0.0.3
3 years ago
0.0.2
3 years ago
1.0.1
6 years ago