The motion system
Motion
Every vael-ui component animates with one motion system. Use the built-in motion as it is, change it with one motion prop, or run it with your own library.
Start here
One prop
Every component takes motion. false turns its motion off. An object changes it: values for its parts, a spring or a duration, or enter and leave hooks for your own library.
<Dialog
v-model:open="open"
:motion="{
initial: { panel: { opacity: 0, y: 12, scale: 0.96 } },
spring: { damping: 0.8, response: 0.4 },
}"
/>Each component page has a Motion section that lists its parts, its states and its other motion options.
In your own components
v-animate gives your own elements the same motion: an entrance, an exit, a size that eases to fit its content, or a slide to a new place when the layout changes. It and the rest of the tools for your own elements import from vael-ui/motion; a Vapor component imports vAnimateVapor from there in place of vAnimate.
<script setup lang="ts">
import { vAnimate } from "vael-ui/motion"
</script>
<template>
<article v-animate.rise="{ when: 'visible' }">
Rises in the first time it scrolls into view.
</article>
</template>For motion of your own, use the composables behind it:
springEasingTurns a spring into a CSS easing and its settle time.useSpringValueA value that follows its target on a spring.useHoverIndicatorThe sliding hover highlight, for your own lists.useTabIndicatorThe sliding indicator behind Tabs and SelectButton.