Animate Layout Group

Animate width and height of lists of components as they enter and exit

import { AnimateLayoutGroup } from "@plexui/ui/components/Transition";

Give each list item a stable key. Use for lists whose items should affect layout as they enter and exit (e.g. dynamic vertical or horizontal lists).

Examples

Overview

<AnimateLayoutGroup> is like <TransitionGroup> for lists, with batteries-included animations and layout (height/width) support.

Same property set as <Animate> plus layoutEnter, layoutExit, and layoutMove.

Vertical list

(Click to remove)

Horizontal list

(Click to remove)

Vue

import { AnimateLayoutGroup } from "@plexui/vue/components/Transition";

Props are the same as in React. Render the items with v-for and a stable :key.

(Click to remove)

Reference

PropTypeDefaultDescription
as"span" | "div""span"Tag used for the wrapper and item elements
classNamestring—Class applied to each item's wrapper element
transitionClassNamestring—Class applied to the inner TransitionGroup
dimension"height" | "width""height"Which property to animate
enterTransitionDefinition—Enter transition
exitTransitionDefinition—Exit transition
initialInitialTransitionDefinition—State before enter
layoutEnterLayoutTransitionDefinition—Layout enter timing
layoutExitLayoutTransitionDefinition—Layout exit timing
layoutMoveLayoutTransitionDefinition—Layout move timing
hideOverflowbooleanfalseApply overflow: hidden to each item's wrapper, the element that resizes
itemAnchor"start" | "end""start"Which side of its wrapper an item pins to during enter/exit
preventInitialTransitionbooleantrueWhen false, run enter on initial mount
insertMethod"append" | "prepend""append"Whether new children are added after (append) or before (prepend) the existing ones
forceCompositeLayerbooleanfalseApplies will-change; use with caution