![svg icon plus svg icon plus](https://cdn.onlinewebfonts.com/svg/img_171718.png)
#SVG ICON PLUS INSTALL#
Install cross-fetch (if you are using CommonJS) or node-fetch (if you are using modules) as dependency.That means icon component cannot retrieve icon data from Iconify API when used on a server side in Node.js environment. It is available in Node.js version 17 using flag " -experimental-fetch", but without it Fetch API is not available. SVG Framework can be used in Node.js scripts, but because there is no DOM, it can be used only to generate data using functions such as buildIcon().Ĭurrently Node.js does not natively support Fetch API.
![svg icon plus svg icon plus](https://cdn.pixabay.com/photo/2014/04/02/10/55/plus-304947_1280.png)
Iconify SVG framework offers many functions, which developers can use to control SVG framework:įor more details see Iconify SVG framework functions. These are not CSS transformations, transformations are applied inside SVG.įor more details see icon transformations tutorial. All transformations are done relative to the center of the icon. TransformationsĪn icon can be rotated and flipped horizontally and/or vertically. However, there is an option to host your own Iconify API, see Iconify API hosting tutorial.įor the Iconify SVG framework to treat the element as icon placeholder, the element must have " iconify" or " iconify-inline" among the list of classes.Įlement also must have a data-icon attribute with icon name as value.įor various ways to change icon dimensions, see changing icon dimensions tutorial.
#SVG ICON PLUS OFFLINE#
However, there is a solution for offline use, see using SVG framework without API bundles. Other SVG frameworks and icon fonts load entire icon sets, wasting your visitor's bandwidth. Only icons that are found on the current page are retrieved from API.If you embed SVG into HTML code, you need to send it to the visitor on every page view. Icons retrieved from Iconify API are cached, so they are retrieved only once. It is very easy to use, just like icon fonts.What are the advantages of this approach? This is done very quickly in a fraction of a second. Iconify SVG framework works by locating icon placeholders, retrieving icon name from placeholder, retrieving icon data from Iconify API, then replacing the placeholder with SVG. See using SVG framework without API tutorial. It allows using Iconify SVG framework in offline web applications. However, SVG framework can also work without API. Downside is, visitor must be online to retrieve icon data. That makes it very easy to use because developer does not need to prepare the icon data. Iconify SVG framework retrieves icon data from Iconify API.