All Projects → chenqingspring → React Lottie

chenqingspring / React Lottie

Licence: mit
Render After Effects animations on React based on lottie-web

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Lottie

React Notifications Component
Delightful and highly customisable React Component to notify your users
Stars: ✭ 978 (-13.6%)
Mutual labels:  react-component
React Tweenful
Animation engine designed for React
Stars: ✭ 48 (-95.76%)
Mutual labels:  react-component
React Filtered Multiselect
Filtered multi-select React component
Stars: ✭ 61 (-94.61%)
Mutual labels:  react-component
Reimgix
🌇 Get all the benefits of Imgix using React. Supports LQIP.
Stars: ✭ 39 (-96.55%)
Mutual labels:  react-component
React Sane Contenteditable
React component with sane defaults to make any element contentEditable
Stars: ✭ 45 (-96.02%)
Mutual labels:  react-component
React Stonecutter
Animated grid layout component for React
Stars: ✭ 1,089 (-3.8%)
Mutual labels:  react-component
React Animated Weather
Animated weather component for React inspired by Skycons http://darkskyapp.github.io/skycons/ ☀️
Stars: ✭ 34 (-97%)
Mutual labels:  react-component
React Console
Simple react console emulator
Stars: ✭ 64 (-94.35%)
Mutual labels:  react-component
React Echarts V3
React.js(v16.x+) component wrap for ECharts.js(v3.x+)
Stars: ✭ 48 (-95.76%)
Mutual labels:  react-component
React No Content
A SVG react component to display when there's no content.
Stars: ✭ 59 (-94.79%)
Mutual labels:  react-component
Kinecttopin
(Eyebeam #1 of 13) Developed with @FakeGreenDress. Record, stream, and export Kinect mocap data to After Effects puppet pins. Record directly from the Kinect or over OSC. Compiling or running from source requires SimpleOpenNI.
Stars: ✭ 40 (-96.47%)
Mutual labels:  after-effects
React For Electron Only
React component for rendering component for Electron based clients only
Stars: ✭ 45 (-96.02%)
Mutual labels:  react-component
React Topbar Progress Indicator
`topbar` progress indicator as a React component
Stars: ✭ 58 (-94.88%)
Mutual labels:  react-component
Spicy Datatable
React.js datatables without jQuery. Smart react datatable that includes search, pagination and localization.
Stars: ✭ 36 (-96.82%)
Mutual labels:  react-component
React Xmasonry
Simple, minimalistic and featured native masonry layout for React JS.
Stars: ✭ 62 (-94.52%)
Mutual labels:  react-component
React Markdown Preview
React component preview markdown text in web browser. The minimal amount of CSS to replicate the GitHub Markdown style.
Stars: ✭ 34 (-97%)
Mutual labels:  react-component
React Contenteditable
React component for a div with editable contents
Stars: ✭ 1,057 (-6.63%)
Mutual labels:  react-component
React Hover
React hover --- make hover easy http://cht8687.github.io/react-hover/example/
Stars: ✭ 64 (-94.35%)
Mutual labels:  react-component
React Bps
🔱 Create breakpoints to your component props
Stars: ✭ 64 (-94.35%)
Mutual labels:  react-component
React Router Form
<Form> is to <form> as <Link> is to <a>
Stars: ✭ 58 (-94.88%)
Mutual labels:  react-component

Lottie Animation View for React (Angular, Vue)

npm version

Demo

https://chenqingspring.github.io/react-lottie

Wapper of bodymovin.js

bodymovin is Adobe After Effects plugin for exporting animations as JSON, also it provide bodymovin.js for render them as svg/canvas/html.

Why Lottie?

Flexible After Effects features

We currently support solids, shape layers, masks, alpha mattes, trim paths, and dash patterns. And we’ll be adding new features on a regular basis.

Manipulate your animation any way you like

You can go forward, backward, and most importantly you can program your animation to respond to any interaction.

Small file sizes

Bundle vector animations within your app without having to worry about multiple dimensions or large file sizes. Alternatively, you can decouple animation files from your app’s code entirely by loading them from a JSON API.

Learn morehttp://airbnb.design/lottie/

Looking for lottie files › https://www.lottiefiles.com/

Installation

Install through npm:

npm install --save react-lottie

Usage

Import pinjump.json.json as animation data

import React from 'react'
import Lottie from 'react-lottie';
import * as animationData from './pinjump.json'

export default class LottieControl extends React.Component {

  constructor(props) {
    super(props);
    this.state = {isStopped: false, isPaused: false};
  }

  render() {
    const buttonStyle = {
      display: 'block',
      margin: '10px auto'
    };

    const defaultOptions = {
      loop: true,
      autoplay: true, 
      animationData: animationData,
      rendererSettings: {
        preserveAspectRatio: 'xMidYMid slice'
      }
    };

    return <div>
      <Lottie options={defaultOptions}
              height={400}
              width={400}
              isStopped={this.state.isStopped}
              isPaused={this.state.isPaused}/>
      <button style={buttonStyle} onClick={() => this.setState({isStopped: true})}>stop</button>
      <button style={buttonStyle} onClick={() => this.setState({isStopped: false})}>play</button>
      <button style={buttonStyle} onClick={() => this.setState({isPaused: !this.state.isPaused})}>pause</button>
    </div>
  }
}

props

The <Lottie /> Component supports the following components:

options required

the object representing the animation settings that will be instantiated by bodymovin. Currently a subset of the bodymovin options are supported:

loop options [default: false]

autoplay options [default: false]

animationData required

rendererSettings required

width optional [default: 100%]

pixel value for containers width.

height optional [default: 100%]

pixel value for containers height.

eventListeners optional [default: []]

This is an array of objects containing a eventName and callback function that will be registered as eventlisteners on the animation object. refer to bodymovin#events where the mention using addEventListener, for a list of available custom events.

example:

eventListeners=[
  {
    eventName: 'complete',
    callback: () => console.log('the animation completed:'),
  },
]

Related Projects

Contribution

Your contributions and suggestions are heartily welcome.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].