-
Notifications
You must be signed in to change notification settings - Fork 917
Closed as duplicate of#3428
Closed as duplicate of#3428
Copy link
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsquestionFurther information is requestedFurther information is requestedv4#4488#4488
Description
Package
v4.x
Description
Summary
I'm trying to add smooth transition animations (fade in/out) for form validation error messages using @formkit/auto-animate, but it doesn't work with Nuxt UI's UFormField component.
For reference, the same @formkit/auto-animate setup works perfectly with shadcn-vue Form components.
Environment
- Nuxt UI: v4.0.1
- Nuxt: v4.1.3
- Vue: v3.5.22
- @formkit/auto-animate: v0.9.0 (configured as Nuxt module)
Expected Behavior
When form validation fails, error messages should:
- ✅ Fade in smoothly instead of appearing abruptly
- ✅ Fade out smoothly when corrected
- ✅ Animate height changes
Current Behavior
Error messages appear/disappear instantly without any transition, regardless of where I place v-auto-animate:
- ❌ On
UFormFielddirectly - ❌ On parent
UForm - ❌ In
UFormField's default slot wrapped with div - ❌ Using programmatic API
useAutoAnimate()
Question
What is the recommended way to add transition animations for form error messages in Nuxt UI?
Is there:
- A built-in way to enable error animations?
- A specific slot or prop for customizing error rendering?
- A CSS-only approach that works with Nuxt UI's structure?
- Support for Vue's
<Transition>component?
Additional Context
- The same
v-auto-animatesetup works on shadcn-vue forms v-auto-animatedoes work for other animations in my Nuxt UI app (e.g., form status transitions)- I suspect the issue is that error messages are rendered as indirect children inside
UFormField, making them undetectable byauto-animate
Any guidance would be greatly appreciated! 🙏
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsquestionFurther information is requestedFurther information is requestedv4#4488#4488