Skip to content

Using auto-animate on AutoForm #768

Answered by sadeghbarati
DesertCookie asked this question in Q&A
Discussion options

You must be logged in to vote

@DesertCookie Hey check this Stackblitz

https://stackblitz.com/edit/pyjkgp?file=src%2Fcomponents%2Fui%2Fform%2FFormItem.vue

You need to use the v-auto-animate directive on FormItem.vue element not on whole Form or Card component


Ways you can use v-auto-animate

  1. on FormItem.vue component
<FormField v-slot="{ componentField }" name="username" :validate-on-blur="!isFieldDirty">
  <FormItem v-auto-animate> /////////////
    <FormLabel>Username</FormLabel>
    <FormControl>
      <Input type="text" placeholder="shadcn" v-bind="componentField" />
    </FormControl>
    <FormDescription>
      This is your public display name.
    </FormDescription>
    <FormMessage />
  </FormItem>
</FormField>

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@DesertCookie
Comment options

Answer selected by DesertCookie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants