Installation

Import and install the Lottie-Player component.

Import From CDN or Local Installation

Using HTML, import the Lottie-Player component or the Telegram Sticker Player from CDN or from the local installation as follows:

Lottie Player

  • Import from a Content Delivery Network (CDN):

<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
  • Import from a local node_modules directory.

<script src="/node_modules/@lottiefiles/lottie-player/dist/lottie-player.js"></script>

Telegram Sticker (TGS) Player

  • Import from a CDN:

<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/tgs-player.js"></script>
  • Import from a local node_modules directory.

<script src="/node_modules/@lottiefiles/lottie-player/dist/tgs-player.js"></script>

Install Using Javascript or TypeScript

Ensure that you have npm or yarn installed before installing this component.

Install package using npm or yarn:

npm install --save @lottiefiles/lottie-player (or)
yarn install --save @lottiefiles/lottie-player

Import package in your code:

import "@lottiefiles/lottie-player";

Last updated