2

Relatively beginner in Vuejs. I am using the Animate.css library for a transition that I want.

Its basically a 4 and 8 column layout when not scrolling , which turns to 1 and 11 when I am scrolling.

It is working fine without the transition , but the overall effect is not pleasurable to the eyes.

This is the URL , that I am using as inspiration

    <div class="column is-4 is-hidden-touch" v-show="! isScroll">
      <navcomponent :navScroll = "isScroll"></navcomponent>
    </div>

    <div class="column is-8" v-show=" ! isScroll">
      <maincontent></maincontent>
    </div>

    <transition enter-active-class="animated fadeIn" leave-active-class="animated fadeOut" mode="out-in">
      <div class="column is-1 is-hidden-touch" v-show="isScroll">
       <navcomponent :navScroll = "isScroll"></navcomponent>
      </div>

    </transition>

  <transition enter-active-class="animated fadeIn" leave-active-class="animated fadeOut" mode="out-in">

    <div class="column is-11" v-show=" isScroll">
      <maincontent></maincontent>
    </div>
  </transition>

Can anybody please provide pointers what I am doing wrong ?

3 Answers 3

9

The approach looks good to me. You can always start with a jsFiddle and go from there.

<transition enter-active-class="animated fadeIn" leave-active-class="animated fadeOut" mode="out-in">
 <div v-if="showWhenCondition">
 </div>
</transition>

A transition and tag with v-if or v-show should be indeed sufficient. Can you detail more what actually happens? Any errors in console?

Sign up to request clarification or add additional context in comments.

4 Comments

No errors just no effect of transition. Problem is , I have to show the div either 4 columns or 1 column
Maybe have a basic jsfiddle with simple divs and columns like in your code
Thanks mate. Any other CSS library that has subtle transitions and plays well with Vuejs
I guess any css library which has classes. You can give vuejs transition's some classes for different transition states (eg. enter-active-class) and as long as it's a valid animation it will work
5

Try this approach and you will get the result.

One has to attach animate__animated animate__(animation name) with the transition tag only then the specified animation would perform.

<transition appear enter-active-class="animate__animated animate__bounce" leave- 
    active-class="animate__animated animate__jello" mode="out-in">
    <div class="alert alert-info" v-if="show">This is some info</div>  
</transition>

1 Comment

This worked for me!
0

Really stupid of me

By mistake I added the animate.css file in the index.html of another project and not the current one.

However , I am not liking the final result.

Do we have any other CSS transitions library that works well with Vuejs ? I dont want to use Javascript hooks for tranitions coz frankly I am at a beginner level.

Something more subtle and easy on the eyes , not disturbing the flow of reading.

1 Comment

I'm late with this, but have a look at wicked css.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.