JS Animations
You can create animations through Javascript (using RAF - requestAnimationFrame()
) with Quasar.
import { animate } from 'quasar' |
Example:
import { animate } from 'quasar' |
Easing Functions
Easing functions take the current percent progress of the animation (a float between 0 and 1) and return a position multiplier (0 being initial position and 1 being final position).
The following easing functions are included:
ease[In|Out|InOut][Quad|Cubic|Quart|Quint|Circ]
- For example,
easeInCubic
.Quad
throughQuint
get progressively more exaggerated.Circ
is slightly different (the graph is a quarter circle), it accelerates much faster at the end.
- For example,
overshoot
- Shoots past the end position and returns slowly
standard
- Use for on-screen movement. Accelerates quickly, decelerates slowly
decelerate
- Use for elements entering the screen. Flies in and slowly decelerates (
easeOutCubic
).
- Use for elements entering the screen. Flies in and slowly decelerates (
accelerate
- Use for elements leaving the screen. Accelerates and then leaves at full velocity (
easeInCubic
).
- Use for elements leaving the screen. Accelerates and then leaves at full velocity (
sharp
- Use for elements leaving the screen that may return (e.g. navigation bar). Accelerates and decelerates (
easeInOutQuad
)
- Use for elements leaving the screen that may return (e.g. navigation bar). Accelerates and decelerates (
Example:
import { animate, easing } from 'quasar' |
Or with the carousel:
<template> |