Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Vue.js Quick Start Guide

You're reading from   Vue.js Quick Start Guide Learn how to build amazing and complex reactive web applications easily using Vue.js

Arrow left icon
Product type Paperback
Published in Oct 2018
Publisher Packt
ISBN-13 9781789344103
Length 186 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ajdin Imsirovic Ajdin Imsirovic
Author Profile Icon Ajdin Imsirovic
Ajdin Imsirovic
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Introducing Vue FREE CHAPTER 2. Basic Concepts of Vue 2 3. Working with Vue-CLI, Components, Props, and Slots 4. Filters and Mixins 5. Making Your Own Directives and Plugins 6. Transitions and Animations 7. Using Vuex 8. Using Nuxt.js and Vue-Router 9. Other Books You May Enjoy

Custom transition classes


Custom transition classes are great when we want to add functionality from a third-party CSS animation library. In this example, we'll be using the Animate.CSS animation library, available here: https://daneden.github.io/animate.css/.

The official documentation covers the use of custom transition classes sufficiently at this URL: https://vuejs.org/v2/guide/transitions.html#Custom-Transition-Classes.

The only thing to add is the example we have been building on, available here: https://codepen.io/AjdinImsirovic/pen/rqazXZ.

The code for the example is as follows. First, we'll start with the HTML:

<div id="app">
  <button v-on:click="show = !show">
    Show? {{ show }}
  </button>
  <transition :duration="4000"
     name="converted"
     enter-active-class="rubberBand animated"
     leave-active-class="bounceOut animated">
        <div v-if="show">
          <custom-component>
          </custom-component>
        </div>...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image