Type Alias: AnimationProps
AnimationProps =
object
Defined in: packages/react/src/jsx.ts:113
Props for the Animation component.
Provides a declarative API for animating widget properties using either timed (duration-based) or spring (physics-based) animations.
Example
<x.Animation
initial={{ opacity: 0, translateY: -20 }}
animate={{ opacity: 1, translateY: 0 }}
exit={{ opacity: 0, translateY: 20 }}
transition={{ mode: "spring", damping: 0.8, stiffness: 200 }}
animateOnMount
>
<GtkLabel label="Animated content" />
</x.Animation>
Properties
animate?
optionalanimate:AnimatableProperties
Defined in: packages/react/src/jsx.ts:117
Target property values to animate towards
animateOnMount?
optionalanimateOnMount:boolean
Defined in: packages/react/src/jsx.ts:123
Whether to animate from initial to animate when first mounted (default: false)
children?
optionalchildren:ReactNode
Defined in: packages/react/src/jsx.ts:129
The child widget to animate (must be a single GTK widget)
exit?
optionalexit:AnimatableProperties
Defined in: packages/react/src/jsx.ts:119
Property values to animate to when the component unmounts
initial?
optionalinitial:AnimatableProperties|false
Defined in: packages/react/src/jsx.ts:115
Initial property values before animation starts, or false to skip initial state
onAnimationComplete()?
optionalonAnimationComplete: () =>void
Defined in: packages/react/src/jsx.ts:127
Callback fired when an animation completes
Returns
void
onAnimationStart()?
optionalonAnimationStart: () =>void
Defined in: packages/react/src/jsx.ts:125
Callback fired when an animation begins
Returns
void
transition?
optionaltransition:AnimationTransition
Defined in: packages/react/src/jsx.ts:121
Transition configuration including animation mode and parameters