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?
已存档?
是复刻?
已锁定?
是镜像?
是私有?