Giter Site home page Giter Site logo

matzielab / react-native-facebook-keyframes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nubescope/react-native-facebook-keyframes

0.0 1.0 0.0 1.25 MB

A react-native wrapper for Facebook Keyframes

License: MIT License

Ruby 0.97% Java 57.20% JavaScript 6.22% Objective-C 35.61%

react-native-facebook-keyframes's Introduction

Keyframes

react-native-facebook-keyframes

A React Native wrapper for the Facebook Keyframes library.

Getting started

npm install react-native-facebook-keyframes --save

react-native link react-native-facebook-keyframes

Steps for iOS only

You must install Facebook Keyframes dependency using CocoaPods:

  1. Install cocoapods in case you don't have already installed:

    sudo gem install cocoapods
  2. Go to [your project's name] ios folder (in this case MyProject):

    cd MyProject/ios  
  3. Create a new Podfile file with the following contents:

    target '{MyProject}' do
      pod 'Keyframes', :git => 'https://github.com/facebookincubator/Keyframes.git', :commit => '07ce61ee388360258777eb3342c87ba6128584d0'
    end
  4. Instal cocoapods dependencies and return to the project folder:

    pod install
    cd ../

Usage

  1. Create a new keyframes json file (you can find a sample here)

  2. Include the library in your js file:

    import KeyframesView from 'react-native-facebook-keyframes'
  3. Use the component:

    <KeyframesView 
      style={{ width: 100, height: 100 }}    // View styles
      seek={1.0}                             // Seek to a given progress in range [0, 1]  
      src={require('./keyframes-logo.json')} // Animation file
    />

Running the demo project included in this project

  1. Go to the demo/KeyframesDemo folder:

    cd demo/KeyframesDemo
  2. Install pod dependencies if running for iOS:

    cd ios
    pod install
    cd ../
  3. Run the project:

    npm install
    react-native run-ios

Demo


MIT Licensed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.