Ikonograph is the official Contactlab icons library. You can use it as npm dependency, you have just to import the css file and you can start to add icons everywhere. You can see all available icons HERE.
Download the .zip
package or install via a package manager (Yarn or NPM):
$ npm install ikonograph --save
You can use Ikonograph as svg sprite or web component.
You can choose to use the svg-sprite version of Ikonograph. SVG sprite is a set of svg symbols that you can import and use inside your html, read about icon fonts vs svg .
There is 2 ways to use the SVG sprite:
This is the new way to use svg-sprite icons, you don't have to include the sprite content inside your page, just link the source file inside the <use>
tag:
<svg width="24" height="24">
<use xlink:href="path/to/ikonograph.svg#agenda"></use>
</svg>
You have to grab the ikonograph.svg
file content and put it inside your main html
file, just after the <body>
tag.
<div style="display: none">
<svg xmlns="http://www.w3.org/2000/svg"><!-- rest of the content--></svg>
</div>
NOTE: You have to put the content inside an hidden container to avoid the blank space.
You can now add icons everywhere:
<svg width="24" height="24">
<use xlink:href="#[icon-name]"></use>
</svg>
Import the ikonograph.js
component inside your file:
<script src="path/to/ikonograph/dist/ikonograph.js">
Use the ikn-icon
element to display the icon by adding the icon name:
<ikn-icon icon="agenda" size="24px"></ikn-icon>
In browsers that don't support Shadow DOM (Firefox or Edge), or, if you are using the polyfill, it isn't possible to update attribute values dynamically without a page reload.
You can also use ikonograph as js module inside your bundler by importing it:
import 'ikonograph/dist/ikonograph';
For detailed instruction on how to use the Ikonograph library and the available icons refer to the Contactlab Pattern Library documentation.
Any feature/bug fixing/refactor must be developed on a feature branch derived from the develop branch and integrate the changes through a pull request to have a code review.
Released and distributed under the Apache 2.0 license.