AnimXYZ helps you create, customize, and compose animations for your website. Powered by CSS variables to allow a nearly limitless number of unique animations without writing a single keyframe. Save time and have complete control over how your elements move. Built for Vue, React, SCSS, and CSS, AnimXYZ will bring your website to life.
For example here is how you make an element fade and shrink in from above:
<div class="xyz-in" xyz="fade up big">I will animate in!</div>
Changing the class to
xyz-out reverses the direction of the animation:
<div class="xyz-out" xyz="fade up big">I will animate out!</div>
For simple animations, that's all you need, but AnimXYZ can do so much more! Check out the AnimXYZ docs!
Using a package manager
AnimXYZ can be installed using your favorite package manager:
# with npm npm install @animxyz/core # with yarn yarn add @animxyz/core
After installation, you will need to import AnimXYZ into your project.
Import into a Webpack project
If your Webpack project uses
Import into a SASS project
AnimXYZ is built in SASS and provides useful functions and mixins for customization. Import it anywhere in your SASS code:
// Import the functions/mixins @import '@animxyz/core'; // Add all the core/utilities selectors @include xyz-all; // --- Or for more control and granularity --- @include xyz-core; @include xyz-utilities;
To add AnimXYZ using a CDN put this link in the
<head> of your
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@animxyz/[email protected]/dist/animxyz.min.css">
Vue & React
If you are using AnimXYZ in a Vue or React project we strongly recommend you also use our AnimXYZ components. To add those, follow the installation instructions in the relevant sections Vue and React.