Skip to main content

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?

optional animate: AnimatableProperties

Defined in: packages/react/src/jsx.ts:117

Target property values to animate towards


animateOnMount?

optional animateOnMount: boolean

Defined in: packages/react/src/jsx.ts:123

Whether to animate from initial to animate when first mounted (default: false)


children?

optional children: ReactNode

Defined in: packages/react/src/jsx.ts:129

The child widget to animate (must be a single GTK widget)


exit?

optional exit: AnimatableProperties

Defined in: packages/react/src/jsx.ts:119

Property values to animate to when the component unmounts


initial?

optional initial: AnimatableProperties | false

Defined in: packages/react/src/jsx.ts:115

Initial property values before animation starts, or false to skip initial state


onAnimationComplete()?

optional onAnimationComplete: () => void

Defined in: packages/react/src/jsx.ts:127

Callback fired when an animation completes

Returns

void


onAnimationStart()?

optional onAnimationStart: () => void

Defined in: packages/react/src/jsx.ts:125

Callback fired when an animation begins

Returns

void


transition?

optional transition: AnimationTransition

Defined in: packages/react/src/jsx.ts:121

Transition configuration including animation mode and parameters