### Install ReactAnimXYZ with npm
Source: https://animxyz.com/docs?example=Staggered&tab=examples
Install the ReactAnimXYZ package using npm. This is the recommended method for most React projects.
```bash
npm install @animxyz/react
```
--------------------------------
### Install ReactAnimXYZ with yarn
Source: https://animxyz.com/docs?example=Staggered&tab=examples
Install the ReactAnimXYZ package using yarn. This is an alternative package manager installation method.
```bash
yarn add @animxyz/react
```
--------------------------------
### Install AnimXYZ with npm
Source: https://animxyz.com/docs?example=Mixing+it+up&tab=examples
Install the core AnimXYZ package using npm. This is the first step for integrating AnimXYZ into your project.
```bash
npm install @animxyz/core
```
--------------------------------
### Install AnimXYZ with npm or yarn
Source: https://animxyz.com/docs?example=Modal&tab=examples
Install the core AnimXYZ package using either npm or yarn. This is the first step before importing the library into your project.
```bash
# with npm
npm install @animxyz/core
# with yarn
yarn add @animxyz/core
```
--------------------------------
### Install AnimXYZ with yarn
Source: https://animxyz.com/docs?example=Mixing+it+up&tab=examples
Install the core AnimXYZ package using yarn. This is an alternative to npm for project integration.
```bash
yarn add @animxyz/core
```
--------------------------------
### Install AnimXYZ with npm
Source: https://animxyz.com/docs?example=Staggered&tab=examples
Use npm to install the core AnimXYZ package. This is the recommended method for Webpack projects.
```bash
# with npm
npm install @animxyz/core
```
--------------------------------
### Example with Stagger and Translate
Source: https://animxyz.com/docs?tab=examples&variables=stagger%3A0.2s%3Btranslate-y%3A-350%25%3Bscale-x%3A0%3Bease%3Acubic-bezier%280.5%2C-1.5%2C0.5%2C1.5%29
This example demonstrates using stagger with translate and scale, along with a custom cubic-bezier easing function for a unique animation effect.
```html
stagger:0.2s;translate-y:-350%;scale-x:0;ease:cubic-bezier(0.5,-1.5,0.5,1.5)
```
--------------------------------
### Advanced Utility Combination Example
Source: https://animxyz.com/docs?tab=examples
Demonstrates a complex combination of utilities including 'fade', 'front', 'flip', 'rotate', 'duration', and 'stagger' for a sophisticated animation.
```html
```
--------------------------------
### Basic Animation Context Example
Source: https://animxyz.com/docs?tab=examples&variables=rotate-z%3A1turn%3Borigin%3Acenter+-200%25%3Bduration%3A2s%3Bscale-x%3A0%3Bscale-y%3A0
Demonstrates the basic usage of the `xyz` attribute to create an animation context for child elements.
```html
```
--------------------------------
### Install VueAnimXYZ for Vue 2.x with npm
Source: https://animxyz.com/docs?example=Mixing+it+up&tab=examples
Install the Vue 2.x version of VueAnimXYZ using npm. This command adds the package to your project dependencies.
```bash
npm install @animxyz/vue
```
--------------------------------
### Install VueAnimXYZ for Vue 2.x with yarn
Source: https://animxyz.com/docs?example=Mixing+it+up&tab=examples
Install the Vue 2.x version of VueAnimXYZ using yarn. This command adds the package to your project dependencies.
```bash
yarn add @animxyz/vue
```
--------------------------------
### Inheriting and Overriding Animation Context Example
Source: https://animxyz.com/docs?tab=examples&variables=rotate-z%3A1turn%3Borigin%3Acenter+-200%25%3Bduration%3A2s%3Bscale-x%3A0%3Bscale-y%3A0
Illustrates how to inherit some variables from a parent context while overriding others with new `xyz` values.
```html
```
--------------------------------
### Complex Animation Combination Example
Source: https://animxyz.com/docs?tab=examples&utilities=fade%3Bfront-3%3Bflip-down-50%25%3Bduration-10%3Bstagger-5
A detailed example showcasing a combination of 'fade', 'down', 'rotate-right', and 'stagger' utilities. This demonstrates the flexibility in composing multiple animation effects.
```html
```
--------------------------------
### Install VueAnimXYZ for Vue 3.x with yarn
Source: https://animxyz.com/docs?example=Mixing+it+up&tab=examples
Install the Vue 3.x version of VueAnimXYZ using yarn. This command adds the package to your project dependencies.
```bash
yarn add @animxyz/vue3
```
--------------------------------
### Extensive Animation Utility Combination
Source: https://animxyz.com/docs?tab=examples&utilities=fade%3Bfront-3%3Bflip-down-50%25%3Bduration-10%3Bstagger-5
An example demonstrating a wide array of animation utilities including 'fade', 'up', 'flip-down', 'flip-right', 'rotate-left', 'origin', 'duration', and 'stagger'. This illustrates the extensive composition possibilities.
```html
```
--------------------------------
### Install VueAnimXYZ for Vue 3.x with npm
Source: https://animxyz.com/docs?example=Mixing+it+up&tab=examples
Install the Vue 3.x version of VueAnimXYZ using npm. This command adds the package to your project dependencies.
```bash
npm install @animxyz/vue3
```
--------------------------------
### Spin and Collapse Animation
Source: https://animxyz.com/docs?tab=examples&utilities=fade%3Bfront-3%3Bflip-down-50%25%3Bduration-10%3Bstagger-5
Demonstrates combining 'spin' and 'collapse' utilities for a unique animation. This example shows how to create a spin effect while simultaneously collapsing the element.
```html
```
--------------------------------
### Directional Utility Variants (In/Out/Appear)
Source: https://animxyz.com/docs?tab=examples
Apply utilities specifically to animation phases like 'In', 'Out', or 'Appear' by prepending the utility name. This example sets different durations and translate directions for entering and exiting.
```html
```
--------------------------------
### Core AnimXYZ Keyframes and Animation Setup
Source: https://animxyz.com/docs?example=Staggered&tab=examples
This snippet shows the underlying CSS keyframes and animation setup used by AnimXYZ. It defines the animation name, duration, and direction based on CSS variables.
```css
@keyframes xyz-keyframes {
from {
opacity: var(--xyz-opacity);
transform: translate3d(
var(--xyz-translate-x),
var(--xyz-translate-y),
var(--xyz-translate-z)
);
}
}
.xyz-in, .xyz-out {
animation-name: xyz-keyframes;
animation-duration: var(--xyz-duration);
}
.xyz-in {
animation-direction: forwards;
}
.xyz-out {
animation-direction: reverse;
}
```
--------------------------------
### Composing Fade, Flip, and Rotate Utilities
Source: https://animxyz.com/docs?tab=examples&utilities=fade%3Bup-100%25%3Bflip-down%3Bflip-right-50%25%3Brotate-left-100%25%3Borigin-bottom%3Bduration-10%3Bstagger
Demonstrates combining 'fade', 'flip-up', and 'flip-left' utilities for a compound animation effect.
```html
Fades, flips up, and flips left.
```
--------------------------------
### Install AnimXYZ with yarn
Source: https://animxyz.com/docs?example=Staggered&tab=examples
Use yarn to add the core AnimXYZ package to your project. This is an alternative to npm for package management.
```bash
# with yarn
yarn add @animxyz/core
```
--------------------------------
### Import AnimXYZ SASS with core and utilities separately
Source: https://animxyz.com/docs?example=Page&tab=examples
Import AnimXYZ SASS functions and mixins, then include core and utility styles separately for more granular control.
```scss
// Import the functions/mixins
@import '@animxyz/core';
// --- Or for more control and granularity ---
@include xyz-core;
@include xyz-utilities;
```