### Install ReactAnimXYZ with yarn
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-installation.md
Use this command to install ReactAnimXYZ via yarn.
```bash
# with yarn
yarn add @animxyz/react
```
--------------------------------
### Install AnimXYZ with yarn
Source: https://github.com/ingram-projects/animxyz/blob/master/README.md
Install the core AnimXYZ package using yarn.
```bash
# with yarn
yarn add @animxyz/core
```
--------------------------------
### Install ReactAnimXYZ with npm
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-installation.md
Use this command to install ReactAnimXYZ via npm.
```bash
# with npm
npm install @animxyz/react
```
--------------------------------
### HTML Example with Utilities
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/utilities.md
Demonstrates how to apply utility classes directly in HTML for animation effects.
```html
```
--------------------------------
### Install AnimXYZ with npm
Source: https://github.com/ingram-projects/animxyz/blob/master/README.md
Install the core AnimXYZ package using npm.
```bash
# with npm
npm install @animxyz/core
```
--------------------------------
### HTML Example with Direction
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/direction.md
Demonstrates how to apply direction utilities to an HTML element. Includes optional styling for variables.
```html
##html
${data.variablesString && `
`}
```
--------------------------------
### Vue Example with TransitionGroup
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/utilities.md
Shows how to use XyzTransitionGroup in Vue.js with utility classes for animating multiple elements.
```vue
```
--------------------------------
### React Example with TransitionGroup
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/utilities.md
Illustrates using XyzTransitionGroup in React with utility classes for animating multiple elements.
```jsx
}
{${data.toggled} && }
{${data.toggled} && }
```
--------------------------------
### Direction Variation Example
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/active-classes.md
Demonstrates how to apply different animations for entering and exiting elements using direction-specific XYZ utilities. This example shows a fade-in with left slide and rotation, and a fade-out with right slide and rotation.
```html
```
```vue
```
```jsx
{${data.toggled} && }
```
--------------------------------
### Core AnimXYZ Keyframes and Animation Setup
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/how-it-works.md
This CSS demonstrates the core keyframe animation 'xyz-keyframes' and the setup for 'xyz-in' and 'xyz-out' classes. It uses CSS variables for animation properties like opacity, transform, and duration.
```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;
}
```
--------------------------------
### React Example with Direction
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/direction.md
Illustrates the use of direction utilities in a React component. Handles conditional rendering and optional CSS variables.
```jsx
##jsx
{${data.toggled} && }
${data.variablesString && `
##html
`}
```
--------------------------------
### HTML Example with Timing Utilities
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/timing.md
Demonstrates how to apply timing utilities like fade and rotate-right to an HTML element. Custom CSS variables can also be applied.
```html
##html
${data.variablesString && `
`}
```
--------------------------------
### Direction Override Example
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/active-classes.md
Illustrates how to override default animations for specific directions. This example uses a general fade-in but a more pronounced left slide for entering, and a shorter left slide for exiting.
```html
```
```vue
```
```jsx
{${data.toggled} && }
```
--------------------------------
### Install AnimXYZ with npm or Yarn
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/installation.md
Use npm or yarn to add the core AnimXYZ package to your project dependencies.
```bash
# with npm
npm install @animxyz/core
# with yarn
yarn add @animxyz/core
```
--------------------------------
### Vue Example with Timing Utilities
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/timing.md
Shows how to use AnimXYZ timing utilities within a Vue.js application. Includes conditional rendering and dynamic style application.
```vue
##vue
${data.variablesString && `
##html
`}
```
--------------------------------
### React Example with Timing Utilities
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/timing.md
Illustrates the use of AnimXYZ timing utilities in a React component. Features conditional rendering and dynamic styling.
```jsx
##jsx
{${data.toggled} && }
${data.variablesString && `
##html
`}
```
--------------------------------
### Vue Example with Direction
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/direction.md
Shows how to use direction utilities within a Vue.js component. Supports conditional rendering and variable styling.
```vue
##vue
${data.variablesString && `
##html
`}
```
--------------------------------
### Default Animation Values Example
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/defaults.md
This example demonstrates how to set default animation values using CSS variables at the root level. These defaults apply to all AnimXYZ elements unless overridden.
```html
```
--------------------------------
### Fade Animation Example
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/fade.md
Demonstrates the basic fade animation applied to a square element using XyzTransition. This example shows how to integrate fade with Vue's conditional rendering.
```html
```
```html
##html
${data.variablesString && `
`}
```
```vue
##vue
${data.variablesString && `
##html
`}
```
```jsx
##jsx
{${data.toggled} && }
${data.variablesString && `
##html
`}
```
--------------------------------
### Example: VW Units for Translation
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/variables.md
Demonstrates using viewport width units (vw) to control the translation distance of an element.
```html
```
--------------------------------
### Basic In Animation
Source: https://github.com/ingram-projects/animxyz/blob/master/README.md
Use the 'xyz-in' class with the 'xyz' attribute to animate an element in. This example fades and shrinks the element from above.
```html
I will animate in!
```
--------------------------------
### HTML Iterate Example
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/iterate.md
This snippet shows how to apply iterate utilities and variables directly in HTML. It includes conditional styling based on data variables.
```html
${data.variablesString && '
'}
```
--------------------------------
### Install Vue 2 AnimXYZ with npm or yarn
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/vue-installation.md
Use npm or yarn to add the Vue 2 version of the AnimXYZ package to your project.
```bash
# with npm
npm install @animxyz/vue
# with yarn
yarn add @animxyz/vue
```
--------------------------------
### Install Vue 3 AnimXYZ with npm or yarn
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/vue-installation.md
Use npm or yarn to add the Vue 3 version of the AnimXYZ package to your project.
```bash
# with npm
npm install @animxyz/vue3
# with yarn
yarn add @animxyz/vue3
```
--------------------------------
### HTML Example with Origin Utility
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/origin.md
This HTML snippet demonstrates applying the 'origin-top-right' utility to scale an element from its top-right corner. It also shows how to conditionally apply custom styles via CSS variables.
```html
${data.variablesString && '
'}
```
--------------------------------
### Basic Out Animation
Source: https://github.com/ingram-projects/animxyz/blob/master/README.md
Use the 'xyz-out' class to reverse the direction of an animation. This example animates the element out.
```html
I will animate out!
```
--------------------------------
### Key-Based Transitions with XyzTransition
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-xyz-transition.md
Animate element transitions based on a changing key prop using 'out-in' mode. This example demonstrates flip animations with a specified duration and easing.
```javascript
import { XyzTransition } from '@animxyz/react'
const key = ${data.key}
{key}
```
--------------------------------
### Mixing Animations and Staggering
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/active-classes.md
Shows how to combine various animations and apply staggering to a group of elements. This example uses fade, up, and stagger for the group, with individual elements having specific in and out animations.
```html
```
```vue
```
```jsx
{${data.toggled} && }
{${data.toggled} && }
{${data.toggled} && }
```
--------------------------------
### React Iterate Example
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/iterate.md
This snippet illustrates the implementation of iterate utilities and variables in a React component. It uses JSX for rendering and conditional logic.
```jsx
{${data.toggled} && }
${data.variablesString && '
##html
'}
```
--------------------------------
### Vue Iterate Example
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/iterate.md
This snippet demonstrates using iterate utilities and variables within a Vue.js application. It conditionally renders an element and applies styles.
```vue
${data.variablesString && '
##html
'}
```
--------------------------------
### HTML with xyz-paused
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/special-classes.md
Demonstrates how to pause animations on elements by adding the 'xyz-paused' class. This example includes various animation properties like duration, stagger, and flip.
```html
```
--------------------------------
### Animating a Grid with Custom Durations and Staggering
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-xyz-transition-group.md
This example demonstrates animating a large grid of elements with custom durations and stagger effects. It utilizes CSS variables for fine-grained control over animation timing.
```javascript
import { XyzTransitionGroup } from '@animxyz/react'
```
```jsx
{${data.toggled} &&
[...Array(81)].map((_, index) => (
))}
```
--------------------------------
### Basic Dynamic XYZ Transition in Vue
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/vue-dynamic-xyz.md
Use `v-xyz` to dynamically set XYZ utilities for a transition component. This example shows how to conditionally apply 'fade' and 'duration-10' based on a data object.
```javascript
const xyzUtilities = {
'down': ${data.xyzUtilities && data.xyzUtilities['down']},
'small': ${data.xyzUtilities && data.xyzUtilities['small']},
'rotate-right': ${data.xyzUtilities && data.xyzUtilities['rotate-right']},
}
```
```vue
```
--------------------------------
### Nested Animations with XyzTransition
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-xyz-transition.md
Animate a container and its children simultaneously. This example uses 'fade' and 'up' animations with staggering for nested elements, setting duration to 'auto'.
```javascript
import { XyzTransition } from '@animxyz/react'
const toggled = ${data.buttonToggled}
{toggled && (
{[...Array(4)].map((_, index) => (
))}
)}
```
--------------------------------
### Animating Elements as They Become Visible
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-xyz-transition-group.md
This example uses the `appearVisible` prop to animate elements only when they scroll into the viewport. It's suitable for animating long lists where only a subset is visible at any time.
```jsx
{[...Array(200)].map((_, index) => (
))}
```
--------------------------------
### React Default Animation Configuration
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/defaults.md
This React.js example shows how to configure default animation values using CSS variables. The styles are applied globally, influencing the 'fade' and 'stagger' animations on the `XyzTransitionGroup` component.
```jsx
{${data.toggled} && }
{${data.toggled} && }
{${data.toggled} && }
##html
```
--------------------------------
### Conditional Class for Paused State
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/special-classes.md
This example shows how to conditionally apply the 'xyz-paused' class based on a data property. This allows for dynamic control of animation playback.
```javascript
className={
`square ${data.paused ? 'xyz-paused' : ''}`
}
```
--------------------------------
### Animating Nested Elements with Staggering
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-xyz-transition-group.md
An example of animating nested elements within an XyzTransitionGroup. Each parent item and its nested children receive staggered fade and flip animations.
```javascript
import { XyzTransitionGroup } from '@animxyz/react'
const numElements = ${data.numElements}
```
```jsx
{[...Array(numElements)].map((_, index) => (
{[...Array(4)].map((_, subIndex) => (
))}
))}
```
--------------------------------
### Switching Between Elements Animation
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/vue-xyz-transition.md
Animate transitions when switching between different elements. This example uses 'out-in' mode to animate the exit of the old element before the entrance of the new one, applying fade and directional transitions.
```javascript
const shape = '${data.shapes && data.shapes[data.shapeIndex]}'
```
```vue
```
--------------------------------
### Chat Component Animation (React)
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/practical-examples.md
Animates chat messages in a list using React. Similar to the Vue example, it applies different animations based on the message owner and uses dynamic xyz properties for directional entry.
```jsx
##jsx
{chatMessages.map((chatMessage) => (
{ chatMessage.isUser ? '🐤' : '🐔' }
{ chatMessage.text }
))}
```
--------------------------------
### Dynamic XYZ Animation by Index in Vue
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/vue-dynamic-xyz.md
Apply complex, index-dependent XYZ animations to a list of elements using `v-xyz` with `v-for`. This example demonstrates alternating 'in' and 'out' animations based on the item's index.
```vue
```
--------------------------------
### Basic Dynamic XYZ Utilities
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-dynamic-xyz.md
Demonstrates how to use the xyz() helper function to apply dynamic and combined XYZ utilities to a transition component. Useful for conditionally animating elements.
```javascript
import { xyz, XyzTransition } from '@animxyz/react'
const xyzUtilities = {
'down': ${data.xyzUtilities && data.xyzUtilities['down']},
'small': ${data.xyzUtilities && data.xyzUtilities['small']},
'rotate-right': ${data.xyzUtilities && data.xyzUtilities['rotate-right']},
}
```
```jsx
{${data.toggled} && }
```
--------------------------------
### CodeSandbox Starter Template for React AnimXYZ
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-installation.md
A CodeSandbox starter template for experimenting with React AnimXYZ.
```js
codesandbox=animxyz-react?overrideEntry=false&buttonTitle=AnimXYZ%20React%20Template
```
--------------------------------
### HTML with xyz-absolute
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/special-classes.md
Demonstrates using 'xyz-absolute' to position elements absolutely during transitions, with separate classes for 'in' and 'out' states.
```html
```
--------------------------------
### React with xyz-paused
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/special-classes.md
Illustrates pausing animations in React by conditionally applying the 'xyz-paused' class within an XyzTransitionGroup. This example features complex animation properties.
```jsx
{${data.toggled} &&
[...Array(4)].map((_, index) => (
```
--------------------------------
### Dynamic XYZ Utilities by Index
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-dynamic-xyz.md
Shows how to apply dynamic and staggered XYZ utilities to a group of elements using their index. Ideal for animating lists or grids where each item has unique animation properties.
```javascript
import { xyz, XyzTransitionGroup } from '@animxyz/react'
```
```jsx
{[...Array(81)].map((_, index) => (
41,
'out-rotate-right-5': index % 2,
'out-rotate-left-5': (index + 1) % 2,
})}
key={index}
/>
))}
```
--------------------------------
### Animating a List of Elements
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-xyz-transition-group.md
Use XyzTransitionGroup to animate a list of elements appearing and disappearing. This example shows a list of squares with fade and rotation effects.
```javascript
import { XyzTransitionGroup } from '@animxyz/react'
const numElements = ${data.numElements}
```
```jsx
{[...Array(numElements)].map((_, index) => (
))}
```
--------------------------------
### Vue with xyz-absolute
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/special-classes.md
Shows how to implement 'xyz-absolute' positioning in Vue using conditional rendering and keys for elements within an XyzTransition.
```vue
```
--------------------------------
### Set XYZ Utility Level Dynamically
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-dynamic-xyz.md
Demonstrates how to dynamically set the level of an XYZ utility, such as 'left-5', by interpolating a variable into the utility string.
```jsx
// Set the utility level dynamically
```
--------------------------------
### Include ReactAnimXYZ via jsDelivr CDN
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-installation.md
Add this script tag to the of your HTML file to include ReactAnimXYZ using the jsDelivr CDN.
```html
```
--------------------------------
### HTML with xyz-none
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/special-classes.md
Demonstrates how to use the 'xyz-none' class to disable animations on specific elements within a transition group.
```html
```
--------------------------------
### Basic Animation Context
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/contexts.md
Demonstrates a basic animation context using the `xyz` attribute on a parent element. This applies 'fade' and 'rotate-right' animations to all nested elements.
```html
```
```vue
```
```jsx
{${data.toggled} && }
{${data.toggled} && }
{${data.toggled} && }
```
--------------------------------
### Vue Default Animation Configuration
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/defaults.md
This Vue.js example demonstrates setting default animation properties using CSS variables within the root scope, affecting the behavior of `XyzTransitionGroup` and its nested elements.
```vue
##html
```
--------------------------------
### HTML with CSS Variables
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/variables.md
Demonstrates how to apply CSS variables directly to an HTML element to customize its animation. Useful for static HTML structures.
```html
##html
${data.variablesString && `
`}
```
--------------------------------
### Dynamically Set XYZ Variables
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-dynamic-xyz.md
Explains how to dynamically set XYZ animation variables like '--xyz-translate-x' by using the `style` prop on an element.
```jsx
// To dynamically set XYZ variables simply use the `style` prop
```
--------------------------------
### Include AnimXYZ via jsDelivr CDN
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/installation.md
Link to the AnimXYZ core stylesheet in the head of your HTML file to include it via CDN.
```html
```
--------------------------------
### CodeSandbox Template for React AnimXYZ with React Router
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-installation.md
A CodeSandbox template demonstrating how to use AnimXYZ with React Router.
```js
codesandbox=animxyz-react-router?overrideEntry=false&buttonTitle=AnimXYZ%20React%20Router%20Template
```
--------------------------------
### Nested Element Animation
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/vue-xyz-transition.md
Animate nested elements with staggered effects. This example applies a fade and small scale transition to multiple child elements within a parent, using 'auto' duration for the parent and specific 'stagger' for children.
```javascript
const toggled = ${data.buttonToggled}
```
```vue
```
--------------------------------
### List Animation with XyzTransitionGroup
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/vue-xyz-transition-group.md
Demonstrates animating a list of elements using XyzTransitionGroup with fade, scale, and rotation effects. Suitable for animating dynamically changing lists.
```javascript
const numElements = ${data.numElements}
```
```vue
```
--------------------------------
### HTML Structure for Perspective Animation
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/perspective.md
This HTML structure sets up a container for a perspective animation using XYZ transition. It includes a square element that will be animated.
```html
```
--------------------------------
### React with xyz-absolute
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/special-classes.md
Illustrates 'xyz-absolute' positioning in React, using conditional rendering and keys within an XyzTransition component.
```jsx
```
--------------------------------
### HTML Structure for Origin Animation
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/origin.md
This HTML structure sets up an element to be animated using animxyz's origin utilities. It includes a wrapper, the XyzTransition component, and a conditional square element.
```html
```
--------------------------------
### CodeSandbox Template for AnimXYZ Vue 2
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/vue-installation.md
A starter template on CodeSandbox for experimenting with AnimXYZ in a Vue 2 environment.
```javascript
codesandbox=animxyz-vue-2?overrideEntry=false&buttonTitle=AnimXYZ%20Vue%202.x%20Template
```
--------------------------------
### Import and Use Vue 2 AnimXYZ Plugin
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/vue-installation.md
Import the Vue 2 AnimXYZ plugin and register it with your Vue instance before app instantiation. Ensure core CSS is imported.
```javascript
import Vue from 'vue'
import VueAnimXYZ from '@animxyz/vue'
import '@animxyz/core' // Import css here if you haven't elsewhere
Vue.use(VueAnimXYZ)
// Instantiate your Vue instance after using plugins
// new Vue(...)
```
--------------------------------
### CodeSandbox Template for AnimXYZ Vue 3
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/vue-installation.md
A starter template on CodeSandbox for experimenting with AnimXYZ in a Vue 3 environment.
```javascript
codesandbox=animxyz-vue-3?overrideEntry=false&buttonTitle=AnimXYZ%20Vue%203.x%20Template
```
--------------------------------
### React Component with CSS Variables
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/variables.md
Illustrates how to apply CSS variables in a React component for animation customization. Ideal for React projects.
```jsx
##jsx
{${data.toggled} && }
{${data.toggled} && }
{${data.toggled} && }
${data.variablesString && `
##html
`}
```
--------------------------------
### Vue Grid Animation
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/practical-examples.md
Demonstrates animating a grid of elements using XyzTransitionGroup in Vue. Ensure the 'xyz' prop is correctly configured for desired effects.
```vue
##vue
```
--------------------------------
### React Snippet for Perspective Animation
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/perspective.md
This React snippet illustrates how to use XYZ perspective transitions within a React application. It includes conditional rendering and styling.
```jsx
{${data.toggled} && }
${data.variablesString && "
##html
"}
```
--------------------------------
### React with xyz-none
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/special-classes.md
Illustrates the use of 'xyz-none' in a React component, conditionally rendering elements and disabling their animations.
```jsx
```
--------------------------------
### XyzTransition Component Props
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/react-xyz-transition.md
Demonstrates the core props for the XyzTransition component: appear, appearVisible, duration, and mode. This snippet shows the basic structure for applying these props.
```jsx
import { XyzTransition } from '@animxyz/react'
```
--------------------------------
### Nested List Animation with XyzTransitionGroup
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/vue-xyz-transition-group.md
Illustrates animating nested elements within a list using XyzTransitionGroup. Ideal for complex UI structures with hierarchical animations.
```javascript
const numElements = ${data.numElements}
```
```vue
```
--------------------------------
### HTML: Basic Fade Up Big Animation
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/the-basics.md
Apply fade and big up animation directly in HTML using the 'xyz' attribute.
```html
```
--------------------------------
### Appear Visible Animation with XyzTransitionGroup
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/vue-xyz-transition-group.md
Demonstrates animating elements as they become visible within a scrollable container using XyzTransitionGroup's 'appear-visible' prop. Suitable for long lists or content that loads on demand.
```vue
```
--------------------------------
### HTML Snippet for Perspective Animation
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/perspective.md
This HTML snippet demonstrates how to apply perspective effects directly within an HTML structure using XYZ utilities. It includes conditional styling for variables.
```html
${data.variablesString && "
"}
```
--------------------------------
### Vue Modal Animation
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/practical-examples.md
Implements a modal with entrance and exit animations using XyzTransition in Vue. The 'xyz' prop on nested elements controls individual animations.
```vue
##vue
I am a modal
```
--------------------------------
### Staggered Grid with HTML
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/stagger.md
Apply staggering directly in HTML by including the 'stagger' utility. Custom CSS variables like --xyz-stagger can be used for fine-grained control over the animation delay.
```html
```
--------------------------------
### CodeSandbox Template for AnimXYZ with Vue Router (Vue 2)
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/vue-installation.md
A CodeSandbox template demonstrating how to integrate AnimXYZ with Vue Router in a Vue 2 application.
```javascript
codesandbox=animxyz-vue-2-router?overrideEntry=false&buttonTitle=AnimXYZ%20Vue%202%20Router%20Template
```
--------------------------------
### Staggered Grid with React
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/stagger.md
Utilize XyzTransitionGroup for staggered animations in React. Be mindful of potential layout shifts with non-absolute positioned elements as they enter or exit.
```jsx
{data.toggled && [...Array(8)].map((_, index) => )}
```
--------------------------------
### Set XYZ Utility Level Dynamically
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/vue-dynamic-xyz.md
Dynamically set the level of an XYZ utility using template string interpolation within the `v-xyz` directive. This allows for variable animation intensity.
```html
```
--------------------------------
### CodeSandbox Template for AnimXYZ with Vue Router (Vue 3)
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/vue-installation.md
A CodeSandbox template demonstrating how to integrate AnimXYZ with Vue Router in a Vue 3 application.
```javascript
codesandbox=animxyz-vue-3-router?overrideEntry=false&buttonTitle=AnimXYZ%20Vue%203%20Router%20Template
```
--------------------------------
### Page Structure Animation in React
Source: https://github.com/ingram-projects/animxyz/blob/master/docs/content/sections/practical-examples.md
This React snippet demonstrates the implementation of XYZ animations for page elements using JSX. Similar to Vue, it employs the XyzTransition component for animations that occur on component mount.
```jsx
##jsx
Curabitur blandit tempus porttitor. Morbi leo risus.