2.0.1 • Published 4 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
4 months ago
2.0.1
4 months ago
2.0.0
4 months ago
1.5.2-dev.1
4 months ago
1.5.2-dev.5
4 months ago
1.5.2-dev.4
4 months ago
1.5.2-dev.3
4 months ago
1.5.2-dev.2
4 months ago
1.5.2-dev.8
4 months ago
1.5.2-dev.7
4 months ago
1.4.4
1 year ago
1.5.1
1 year ago
1.5.0
1 year ago
1.4.3
1 year ago
1.4.2
1 year ago
1.4.1
1 year ago
1.4.0
1 year ago
1.3.0
1 year 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
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
1.0.1
6 years ago