Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

lord-icon-element

1.2.3 • Public • Published

lord-icon-element

A convenient custom element for embedding animated icons.

Overview

lord-icon-element lets you write websites with fancy, interactive, animated icons. With this element you can embed and control Lottie Files. Under the hood, the library uses awesome lottie-web animation player. Explore free library of 50 interactive icons.

Installation

$ npm install lord-icon-element lottie-web

Usage

From script module:

import { loadAnimation } from 'lottie-web';
import { defineLordIconElement } from 'lord-icon-element';
 
// register lottie and define custom element 
defineLordIconElement(loadAnimation);

From markup:

<lord-icon animation="hover" src="/my-icon.json"></lord-icon>               

Examples

For more usage examples visit our repository. It's recommended to run them with:

npm i
npm start

After that your browser will start automatically with our examples.

Notice

Compatibility

This library support at the moment only modern browsers which allows to use Web Components and JavaScript Modules. If you need to support legacy browsers include in your project polyfills.

Modules

It's recommended to use this library with module bundler tools like webpack. If you want use this library without bundler, remember to import modules by path, not by package name.

Static release

You can use this library also without JS modules with released version. This is simplest way to use our element without any initialization and external tools. Just look for our JSFiddle example.

Keywords

Install

npm i lord-icon-element

DownloadsWeekly Downloads

118

Version

1.2.3

License

MIT

Unpacked Size

63.5 kB

Total Files

45

Last publish

Collaborators

  • avatar