Vue Flip

A component to flip elements

Simple Example (hover)

front
back
        <vue-flip :active-hover="true" width="200px" height="50px">
          <template v-slot:front class="front">
            front
          </template>
          <template v-slot:back class="back">
            back
          </template>
        </vue-flip>
      

Simple Example (click)

front
back
        <vue-flip active-click="true" width="200px" height="50px">
          <template v-slot:front class="front">
            front
          </template>
          <template v-slot:back class="back">
            back
          </template>
        </vue-flip>
      

Simple Example (click & hover)

front
back
        <vue-flip active-click="" width="200px" height="50px">
          <template v-slot:front class="front">
            front
          </template>
          <template v-slot:back class="back">
            back
          </template>
        </vue-flip>
      

Horizontal Example

front
back
        <vue-flip active-click="" width="200px" height="50px" horizontal="true">
          <template v-slot:front class="front">
            front
          </template>
          <template v-slot:back class="back">
            <span>
              back
            </span>
          </template>
        </vue-flip>
      

Example with transition property

front
back
        <vue-flip :active-hover="true" width="200px" height="50px" transition="2s">
          <template v-slot:front class="front">
            front
          </template>
          <template v-slot:back class="back">
            back
          </template>
        </vue-flip>
      

Flip card programmatically

front
back
false
        <vue-flip :active-hover="true" width="200px" height="50px" class="simple-test" v-model="model">
          <template v-slot:front class="front">
            front
          </template>
          <template v-slot:back class="back">
            back
          </template>
        </vue-flip>
      

Flip one time

disable me!
back
        <vue-flip v-model="model2" class="simple-test" width="20%" height="50px">
          <template v-slot:front class="front">
            <span style="display: flex; align-items: center; justify-content: center; height: 100%; width: 100%;">disable me!</span>
          </template>
          <template v-slot:back class="back">
            back
          </template>
        </vue-flip>
      
        <code>
          export default {
            methods: {
              handleClick () {
                this.model2 = true
              }
            }
          }
        </code>
      

Use case: Pairs

?
D
?
A
?
D
?
C
?
B
?
E
?
C
?
E
?
B
?
A

Use case: Flip Cards

0
😀
1
😀
2
😀
3
😀
4
😀
5
😀
6
😀
7
😀
8
😀
9
😀