Official LottieFiles player for rendering Lottie and dotLottie animations in React Native
Installations
npm install @lottiefiles/dotlottie-react-native
Developer Guide
Typescript
No
Module System
CommonJS, ESM
Node Version
18.20.4
NPM Version
10.7.0
Score
33.5
Supply Chain
56
Quality
66.7
Maintenance
50
Vulnerability
94.1
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
Kotlin (35.66%)
TypeScript (29.21%)
Swift (16.34%)
Objective-C (7.81%)
Ruby (6.29%)
JavaScript (2.96%)
Objective-C++ (1.52%)
C (0.19%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
LottieFiles
Download Statistics
Total Downloads
409
Last Day
10
Last Week
42
Last Month
148
Last Year
409
GitHub Statistics
MIT License
5 Stars
7 Commits
2 Forks
4 Watchers
6 Branches
13 Contributors
Updated on Nov 10, 2024
Bundle Size
4.96 kB
Minified
1.16 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.2.0
Package Id
@lottiefiles/dotlottie-react-native@0.2.0
Unpacked Size
106.23 kB
Size
20.23 kB
File Count
56
NPM Version
10.7.0
Node Version
18.20.4
Published on
Oct 08, 2024
Total Downloads
Cumulative downloads
Total Downloads
409
Last Day
400%
10
Compared to previous day
Last Week
55.6%
42
Compared to previous week
Last Month
66.3%
148
Compared to previous month
Last Year
0%
409
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Peer Dependencies
2
Dev Dependencies
19
dotLottie React Native
Lottie & dotLottie component for React Native (iOS and Android)
Installation
1npm install @lottiefiles/dotlottie-react-native
Usage
1import { Button, StyleSheet, View } from 'react-native'; 2import { DotLottie, Mode, type Dotlottie } from '@lottiefiles/dotlottie-react-native'; 3import { useRef } from 'react'; 4 5export default function App() { 6 const ref = useRef<Dotlottie>(null); 7 8 return ( 9 <View style={styles.container}> 10 <DotLottie 11 ref={ref} 12 source={require('../assets/animation.lottie')} 13 style={styles.box} 14 loop={false} 15 autoplay={false} 16 /> 17 <Button title="Play" onPress={() => ref.current?.play()} /> 18 <Button title="Pause" onPress={() => ref.current?.pause()} /> 19 <Button title="Stop" onPress={() => ref.current?.stop()} /> 20 <Button title="Loop" onPress={() => ref.current?.setLoop(true)} /> 21 <Button title="Speed" onPress={() => ref.current?.setSpeed(1)} /> 22 <Button 23 title="FORWARD" 24 onPress={() => ref.current?.setPlayMode(Mode.FORWARD)} 25 /> 26 <Button 27 title="REVERSE" 28 onPress={() => ref.current?.setPlayMode(Mode.REVERSE)} 29 /> 30 </View> 31 ); 32} 33 34const styles = StyleSheet.create({ 35 container: { 36 flex: 1, 37 alignItems: 'center', 38 justifyContent: 'center', 39 }, 40 box: { 41 width: 200, 42 height: 200, 43 marginVertical: 20, 44 }, 45});
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library

No vulnerabilities found.

No security vulnerabilities found.