console.clear();
Vue.component('box1', {
template: '<div class="box box1">box1</div>'
});
Vue.component('box2', {
template: '<div class="box box2">box2</div>'
});
new Vue({
el: "#app",
data: {
box1: true,
currentTransition: 'down',
mode: 'out-in',
descriptions: {
down: '<p>The down animation uses the inset shape in two different animations to push the sides in a downward direction.</p><p>The leave transition starts with all four sides at 0 and then animates the top down to 100%.</p><p>The enter transition starts with the bottom side already pushed upward 100% and then animates the bottom down to 0.</p>',
'box-wipe': '<p>The box wipe animation uses the inset shape to create a box that shrinks down to the left side and then moves off the right side.</p><p>The leave transition shrinks the large square to a half-size square placed on the left side of the element. It then moves the square to the right beyond the edge of the element.</p><p>The enter animation does the same in reverse.</p>',
rotate: '<p>The rotate animation uses the polygon shape to create a rotating square.</p><p>The leave transition animates the square\'s four vertices inward and clockwise over five keyframes. This movement gives the appearance of a rotating and shrinking square.</p><p>The enter transition does the same in reverse giving the appearance of a rotating and growing square.</p>',
spotlight: '<p>The spotlight animation uses the circle shape over five keyframes.</p><p>The leave transition starts with shrinking the circle from 100% down to 20% in the center. The next four keyframes animate the location of the circle to various spots in the box area until it moves off the left side.</p><p>The enter transition does the same in reverse.</p>'
}
},
methods: {
transition () {
this.box1 = !this.box1;
}
}
})
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.