lottie-wc

Provides , a simple web component to use lottie animations by Airbnb

  • Owner: splitinfinities/lottie-wc
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

Built With Stencil

Lottie Animation Web Component

This is a dead simple lottie animation web component, compiled with Stencil.

<lottie-animation src="./assets/lottie_logo.json" autoplay loop controls></lottie-animation>
<script src='https://unpkg.com/lottie-wc/dist/lottie.js'></script>

It's intentionally minimal design so that you can apply your own design language to this.

Lottie Animation Example

Using this component

Script tag

  • Publish to NPM
  • Put a script tag similar to this <script src='https://unpkg.com/lottie-wc/dist/lottie.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

Node Modules

  • Run npm install lottie-wc --save
  • Put a script tag similar to this <script src='node_modules/lottie-wc/dist/lottie.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

In a stencil-starter app

  • Run npm install lottie-wc --save
  • Add { name: 'lottie-wc' } to your collections
  • Then you can use the element anywhere in your template, JSX, html etc

Developing

To start building a new web component using Stencil, clone this repo to a new directory:

git clone https://github.com/splitinfinities/lottie-wc.git lottie-wc
cd lottie-wc
git remote rm origin

and run:

npm install
npm start

To watch for file changes during develop, run:

npm run dev

To build the component for production, run:

npm run build

To run the unit tests for the components, run:

npm test

Need help? Check out our docs here.

Main metrics

Overview
Name With Ownersplitinfinities/lottie-wc
Primary LanguageHTML
Program languageCSS (Language Count: 4)
Platform
License:MIT License
所有者活动
Created At2018-03-24 20:07:13
Pushed At2018-04-09 21:42:24
Last Commit At2018-04-09 16:41:00
Release Count4
Last Release Name1.1.0 (Posted on )
First Release Namev1.0.0 (Posted on 2018-03-24 15:09:02)
用户参与
Stargazers Count109
Watchers Count1
Fork Count5
Commits Count9
Has Issues Enabled
Issues Count1
Issue Open Count0
Pull Requests Count1
Pull Requests Open Count0
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private