Skip to content

Animation

Explicit animation configuration for animatable control properties.

Properties that accept animation usually also support shorthand values via AnimationValue: - True: enables a default 1000ms LINEAR animation. - int: interpreted as animation duration in milliseconds with a linear curve.

Properties

Methods

  • copy

    Returns a copy of this object with the specified properties overridden.

Properties#

curve class-attribute instance-attribute #

Easing curve that shapes interpolation over time.

duration class-attribute instance-attribute #

duration: DurationValue = field(
    default_factory=lambda: Duration()
)

The duration of the animation.

If provided as an integer, it is considered/assumed to be in milliseconds. For more control and flexibility, use Duration instead.

Methods#

copy #

copy(
    *,
    duration: DurationValue | None = None,
    curve: AnimationCurve | None = None,
) -> Animation

Returns a copy of this object with the specified properties overridden.