No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to change duration of transition on q-carousel?

    Help
    2
    2
    417
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      huay7 last edited by

      quasar provides serveral transitions on q-carousel?
      how can i change duration of transition on q-carousel?
      thank you very much

      1 Reply Last reply Reply Quote 0
      • C
        charlieknoll last edited by

        I created custom transition css for a 3 second transition (I’m not sure if all of the css is necessary):

        <style>
        .q-carousel__slide {
          min-height: 100%;
          background-size: contain;
          background-position: 50%;
          background-repeat: no-repeat;
        }
        .q-carousel__slides-container {
          height: 100%;
          background-color: black;
        }
        
        .q-transition--slide-fade-enter-active {
          transition: all 3s cubic-bezier(0.33, 1, 0.68, 1);
        }
        .q-transition--slide-fade-leave-active {
          transition: all 3s cubic-bezier(0.32, 0, 0.67, 0);
        }
        .q-transition--slide-fade-enter,
        .q-transition--slide-fade-leave-to {
          opacity: 0;
          position: absolute;
        }
        </style>
        

        Then set your props on the carousel:

              transition-next="slide-fade"
              transition-prev="slide-fade"
        
        

        Also, be sure to have animations turned on in your OS.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post