Combine with Tailwind hover:scale-x #37
-
Hi, I use Vue for my project. When I use the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hey @florian-lefebvre sorry just seeing this now. So to be clear, when you hover the gray boxes the |
Beta Was this translation helpful? Give feedback.
-
HoverableAnimated.vue <template>
<div class="xyz-nested" ref="el">
<slot />
</div>
</template>
<script>
export default {
props: ["endClass"],
mounted() {
let el = this.$refs.el;
el.addEventListener("animationend", () => {
el.classList.remove("xyz-nested");
el.classList.add(this.$props.endClass);
});
}
};
</script> And I use it like: <HoverableAnimated
v-for="(e, i) in skills"
:key="i"
xyz="delay-8 small fade stagger-2 ease-out-back"
class="flex justify-center px-6 py-8 transition-transform transform bg-gray-300 cursor-default md:py-10 dark:bg-gray-900 rounded-2xl"
endClass="md:hover:scale-105"
>
<div class="flex flex-col items-center space-y-2">
<component
:is="e.icon"
class="w-8 h-8 text-gray-600 fill-current dark:text-gray-400"
></component>
<div class="text-lg font-semibold text-center">
{{ e.name }}
</div>
</div>
</HoverableAnimated> |
Beta Was this translation helpful? Give feedback.
.animate-none
didn't work, even associated with!important
@milesingrams.So as you suggested @mattaningram, I found a workaround. I created a component to check when the animation is done.
HoverableAnimated.vue
And I use it like: