Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

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 supported free 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 trigger="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 many 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.

About

No description, website, or topics provided.

Resources

License

Packages

No packages published