0.0.3 • Published 3 years ago
@vace/animations v0.0.3
@vace/animations
CSS animations
Usage
import all animations css
import '@vace/animations/animations.css'<div class="ani-fade-in"></div>import all animations json config
import animations from '@vace/animations/animations.json'create css code from json config
import { animations, stringify } from '@vace/animations'
/**
* @keyframes ani-fade-in { ...
* .ani-fade-in {
* animation: var(--animate-duration, 1s) infinite both ani-fade-in
* }
*/
const csscode = stringify(animations[0], { prefix: 'ani' })
// or
const csscode = stringify('fade-in', { prefix: 'ani' })animation decorator
@globalfile config@delay: 'animationDelay'@direction: 'animationDirection'@duration: 'animationDuration'@mode: 'animationFillMode'@count: 'animationIterationCount'@state: 'animationPlayState'@easeing: 'animationTimeingFunction'@backface: 'backfaceVisibility'
prefix
text-*text animation (letter-spacing,text-shadow)bg-*background animation (background-color,background-position)ccwcounterclockwisefwdforwardbckbackdiagdiagonal*-lleft*-rright*-ttop*-bbottom
Credits
License
This project is licensed under the MIT License.