8
8
vueDirectiveApp ,
9
9
vueComposable ,
10
10
} from " ../examples/vue"
11
- import { angularDirectiveMain , angularDirectiveApp } from " ../examples/angular"
11
+ import { angularDirectiveMain } from " ../examples/angular"
12
12
import { solidPrimitive , solidDirective } from " ../examples/solid"
13
13
import reactHook from " ../examples/react"
14
14
import preactHook from " ../examples/preact"
@@ -160,14 +160,16 @@ import IconQwik from "../components/IconQwik.vue"
160
160
<h2 id =" usage-vue" >Vue directive</h2 >
161
161
<p >
162
162
Vue users can globally register the
163
- <code >v-auto-animate</code > directive or install the Nuxt module. This makes adding transitions and
164
- animations as easy as applying an attribute. Import the Vue plugin from
165
- <code >@formkit/auto-animate/vue</code > and register it with your Vue app:
163
+ <code >v-auto-animate</code > directive or install the Nuxt module. This
164
+ makes adding transitions and animations as easy as applying an attribute.
165
+ Import the Vue plugin from <code >@formkit/auto-animate/vue</code > and
166
+ register it with your Vue app:
166
167
</p >
167
168
<CodeExample :examples =" vueDirectiveMain" title =" main" />
168
169
<AsideTip >
169
170
If you prefer to not register the Vue directive globally, you can import
170
- it directly into the component where you want to use it <code >import { vAutoAnimate } from '@formkit/auto-animate'</code >.
171
+ it directly into the component where you want to use it
172
+ <code >import { vAutoAnimate } from '@formkit/auto-animate'</code >.
171
173
</AsideTip >
172
174
<p >
173
175
Once you’ve registered the plugin, it can be applied anywhere in your
@@ -194,8 +196,8 @@ import IconQwik from "../components/IconQwik.vue"
194
196
</p >
195
197
<p >
196
198
Import the composable from <code >@formkit/auto-animate/vue</code > (the
197
- Nuxt module will automatically import <code >useAutoAnimate</code > for you), and
198
- call it in <code >script setup</code > to create a
199
+ Nuxt module will automatically import <code >useAutoAnimate</code > for
200
+ you), and call it in <code >script setup</code > to create a
199
201
<a
200
202
href =" https://vuejs.org/guide/essentials/template-refs.html#template-refs"
201
203
target =" _blank"
@@ -256,24 +258,24 @@ import IconQwik from "../components/IconQwik.vue"
256
258
257
259
<h2 id =" usage-angular" >Angular directive</h2 >
258
260
<p >
259
- Angular users can globally register the
260
- <code >auto-animate</code > directive. This makes adding transitions and
261
- animations as easy as applying an attribute. Import the AutoAnimateModule
262
- from <code >@formkit/ auto-animate/angular </code > and register it with your
263
- Angular app :
261
+ Import < code >AutoAnimateDirective</ code > from
262
+ <code >@formkit/ auto-animate/angular </code > into a module or a standalone
263
+ component to easily add transitions and animations by applying the
264
+ <code >auto-animate</code > attribute to the parent element in your
265
+ template :
264
266
</p >
265
267
<CodeExample :examples =" angularDirectiveMain" title =" App" />
266
- <p >
267
- Once you’ve registered the plugin, it can be applied anywhere in your
268
- application by adding the <code >auto-animate</code > directive to the
269
- parent element:
270
- </p >
271
- <CodeExample :examples =" angularDirectiveApp" title =" App" />
272
268
<ActualAngularApp />
273
269
<AsideTip >
274
270
Angular users can pass options by directly setting the options input
275
271
<code >< ; ul auto-animate [options]="{ duration: 100 }"> ; </code >
276
272
</AsideTip >
273
+ <AsideTip >
274
+ In Angular versions < ; 16 you can only import
275
+ <code >AutoAnimateModule</code > in <code >NgModule</code >s. And you have to
276
+ use auto-animate v0.8.2 or earlier. Angular v16 isn't directly supported,
277
+ but you can easily write a wrapper.
278
+ </AsideTip >
277
279
278
280
<!-- <h2 id="usage-qwik">Qwik hook</h2>
279
281
<p>
0 commit comments