A convenient custom element for embedding animated icons.
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.
$ npm install lord-icon-element lottie-web
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>
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 demo.