File tree Expand file tree Collapse file tree 3 files changed +3052
-98
lines changed Expand file tree Collapse file tree 3 files changed +3052
-98
lines changed Original file line number Diff line number Diff line change 3
3
This is a Vue component for the Lottie Web Player. This library is a vue wrapper around the LottieFiles Lottie Web Player
4
4
5
5
![ screencast] ( https://github.com/LottieFiles/lottie-vue/blob/master/demo.gif )
6
+
6
7
#### In Javascript or TypeScript:
7
8
8
9
1 . Install package using npm or yarn.
@@ -22,6 +23,42 @@ import LottieVuePlayer from "@lottiefiles/vue-lottie-player";
22
23
Vue .use (LottieVuePlayer);
23
24
```
24
25
26
+ #### With Nuxt:
27
+
28
+ 1 . Install package using npm or yarn.
29
+
30
+ ``` shell
31
+ npm install --save @lottiefiles/vue-lottie-player
32
+ ```
33
+
34
+ 2 . Create a folder called 'plugins' at the root of your project
35
+
36
+ 3 . Create a file named 'lottie-vue-player.client.js' inside the 'plugins' directory
37
+
38
+ 4 . Inside this file put :
39
+
40
+ ``` javascript
41
+
42
+ import Vue from ' vue' ;
43
+
44
+ import LottieVuePlayer from " @lottiefiles/vue-lottie-player" ;
45
+
46
+ Vue .use (LottieVuePlayer);
47
+
48
+ ```
49
+
50
+ 5 . Add to nuxt.config.js:
51
+
52
+ ``` javascript
53
+
54
+ plugins: [
55
+ " ~/plugins/lottie-vue-player.client.js"
56
+ ]
57
+
58
+ ```
59
+
60
+ ---
61
+
25
62
## Example/Development
26
63
27
64
1 . Clone repo
Original file line number Diff line number Diff line change 27
27
],
28
28
"license" : " MIT" ,
29
29
"dependencies" : {
30
- "@lottiefiles/lottie-player" : " ^1.0.4 " ,
30
+ "@lottiefiles/lottie-player" : " ^1.5.2 " ,
31
31
"vue" : " ^2.6.12" ,
32
32
"vue-clickaway" : " ^2.2.2"
33
33
},
You can’t perform that action at this time.
0 commit comments