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
| Prop | Type | Default | Description |
|---|---|---|---|
as | "span" | "div" | "span" | Tag used for the wrapper and item elements |
className | string | — | Class applied to each item's wrapper element |
transitionClassName | string | — | Class applied to the inner TransitionGroup |
dimension | "height" | "width" | "height" | Which property to animate |
enter | TransitionDefinition | — | Enter transition |
exit | TransitionDefinition | — | Exit transition |
initial | InitialTransitionDefinition | — | State before enter |
layoutEnter | LayoutTransitionDefinition | — | Layout enter timing |
layoutExit | LayoutTransitionDefinition | — | Layout exit timing |
layoutMove | LayoutTransitionDefinition | — | Layout move timing |
hideOverflow | boolean | false | Apply 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 |
preventInitialTransition | boolean | true | When false, run enter on initial mount |
insertMethod | "append" | "prepend" | "append" | Whether new children are added after (append) or before (prepend) the existing ones |
forceCompositeLayer | boolean | false | Applies will-change; use with caution |