formkit / auto-animate

A zero-config, drop-in animation utility that adds smooth transitions to your web app. You can use it with React, Vue, or any other JavaScript application.

Home Page:https://auto-animate.formkit.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add auto-animate to custom components (NuxtUI)

DesertCookie opened this issue · comments

How can I add the v-auto-animate directive to custom components? Specifically, I'm trying to add it to a NuxtUI table that has hideable columns. I want the columns to slide when a column is hidden/shown.

Adding the directive to components does not seem to do anything due to the actual table rows and columns probably being nested too deep inside the component.

Thats correct — if the component exposes refs to its internals you could use those. if it does not, then just use the ol' document.querySelector() to target the parent dom node and then apply auto animate to it.