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:
-
Install cocoapods
in case you don't have already installed:
sudo gem install cocoapods
-
Go to [your project's name]
ios folder (in this case MyProject
):
cd MyProject/ios
-
Create a new Podfile
file with the following contents:
target '{MyProject}' do
pod 'keyframes', :git => 'https://github.com/EddyVerbruggen/Keyframes.git', :commit => 'cb645d8722c2e9327c15dd973a2121644288b1c0'
end
-
Instal cocoapods dependencies and return to the project folder:
pod install
cd ../
Usage
-
Create a new keyframes json file (you can find a sample here)
-
Include the library in your js file:
import KeyframesView from 'react-native-facebook-keyframes'
-
Use the component:
<KeyframesView
style={{ width: 100, height: 100 }}
seek={1.0}
src={require('./keyframes-logo.json')}
/>
Running the demo project included in this project
-
Go to the demo/KeyframesDemo
folder:
cd demo/KeyframesDemo
-
Install pod dependencies if running for iOS:
cd ios
pod install
cd ../
-
Run the project:
npm install
react-native run-ios
Demo
MIT Licensed