Skip to content

Animation

Animacion v-model: 50

Enable animation

Animation adds a smooth transition when the slider changes value on tap or when using .set():

vue
<Slider
    v-model="value"
    :range="{ min: 0, max: 100 }"
    :animate="true"
    behaviour="tap"
/>

Custom duration

By default the animation lasts 300ms. You can customize the duration:

vue
<Slider
    v-model="value"
    :range="{ min: 0, max: 100 }"
    :animate="true"
    :animation-duration="500"
    behaviour="tap"
/>

Disable animation

vue
<Slider
    v-model="value"
    :range="{ min: 0, max: 100 }"
    :animate="false"
/>

TIP

Both animate and animationDuration are reactive. You can change them at runtime and the slider updates automatically.

Released under the MIT License.