lottie-wc

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

  • 所有者: splitinfinities/lottie-wc
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

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.

主要指標

概覽
名稱與所有者splitinfinities/lottie-wc
主編程語言HTML
編程語言CSS (語言數: 4)
平台
許可證MIT License
所有者活动
創建於2018-03-24 20:07:13
推送於2018-04-09 21:42:24
最后一次提交2018-04-09 16:41:00
發布數4
最新版本名稱1.1.0 (發布於 )
第一版名稱v1.0.0 (發布於 2018-03-24 15:09:02)
用户参与
星數109
關注者數1
派生數5
提交數9
已啟用問題?
問題數1
打開的問題數0
拉請求數1
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?