AnimXYZ

The first truly composable CSS animation library. Built for Vue, React, SCS...

README

AnimXYZ Logo

AnimXYZ



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:

  1. ``` html
  2. <div class="xyz-in" xyz="fade up big">I will animate in!</div>
  3. ```
Changing the class to xyz-out reverses the direction of the animation:

  1. ``` html
  2. <div class="xyz-out" xyz="fade up big">I will animate out!</div>
  3. ```
[See it in action here]()

For simple animations, that's all you need, but AnimXYZ can do so much more! Check out the AnimXYZ docs!

Installation


Using a package manager


AnimXYZ can be installed using your favorite package manager:

  1. ``` sh
  2. # with npm
  3. npm install @animxyz/core

  4. # with yarn
  5. yarn add @animxyz/core
  6. ```

After installation, you will need to import AnimXYZ into your project.

Import into a Webpack project

If your Webpack project uses css-loader you can import the CSS by putting this snippet anywhere in your javascript code:

  1. ``` js
  2. import '@animxyz/core'
  3. ```

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:

  1. ```scss
  2. // Import the functions/mixins
  3. @import '@animxyz/core';

  4. // Add all the core/utilities selectors
  5. @include xyz-all;
  6. // --- Or for more control and granularity ---
  7. @include xyz-core;
  8. @include xyz-utilities;
  9. ```

Using jsDelivr


To add AnimXYZ using a CDN put this link in the `` of your `index.html` file:

  1. ``` html
  2. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@animxyz/core">
  3. ```

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.

Made By


Miles Ingram • GitHubWebsite

Mattan Ingram • GitHubWebsite