File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
docs/content/1.installation Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ # Vue only
2+
3+ Since Version ` 1.2.1 ` you can also use this module for Vue - instead of Nuxt.
4+
5+ :: alert { type =" info " }
6+ This feature is still experimental and to use with caution.
7+ Please report any issues on the [ Github Issues Tab] ( https://github.com/holux-design/v-gsap-nuxt/issues )
8+ ::
9+
10+ ## 1. Install package
11+
12+ To use with Vue, do not use the auto-install command, since this is a nuxt-specific module install. Instead install the package itself through npm:
13+
14+ ``` bash [npx]
15+ npm i v-gsap-nuxt
16+ ```
17+
18+ ## 2. Import directive
19+
20+ In the second step go to your ` main.ts ` file for your vue app, import the Vue plugin and add it to your app ** after initialization and before mount** :
21+
22+ :: code-group
23+
24+ ``` ts [main.ts]
25+ import { vGsapVue } from ' v-gsap-nuxt/vue' ;
26+
27+ // const app = createApp(App);
28+ app .directive (' gsap' , vGsapVue ());
29+ // app.mount('#app');
30+ ::
31+
32+
33+ ## Configuration
34+
35+ Since global configuration for nuxt happens in ` nuxt.config.ts ` which is not available in Vue , you can add these settings directly during initialization . All props are the same as with nuxt .
36+
37+ ::code - group
38+
39+ ` ` ` ts [main.ts]
40+ app.directive('gsap', vGsapVue({
41+ presets: [],
42+ breakpoint: 768,
43+ scroller: '',
44+ composable: true
45+ }));
46+ ::
47+
48+ [See reference](/installation/configuration)
You can’t perform that action at this time.
0 commit comments