Currently I'm working in Vue.js and have a navigation menu that I'd like to animate. What I'm looking to do is show two li
elements when a user hovers over one of the navigational buttons.
Currently what I'm doing is setting a data type of showActivities
to false by default and setting that to true on mouseenter
and false on mouseleave
. So this has the items appearing and disappearing on hover but they're not animated. How could animation for this be done?
<ul class="navs">
<li>Schedule</li>
<li @mouseenter="showActivities = true" @mouseleave="showActivities = false">Team Activity</li>
<li v-show="showActivities">tik tak tow</li>
<li v-show="showActivities">Bejewel</li>
<li>Resources</li>
<li class="logout"><a href="https://google.com" target="_blank">Logout</a></li>
</ul>
<script>
export default {
name: 'SideMenu',
data() {
return {
showActivities: false,
};
},
};
</script>