Interface Literal<TemplateSpecType, Key>

Animation Settings object literal

See Animation Attributes for more information.

interface Literal<
    TemplateSpecType = Lightning.Element.TemplateSpec,
    Key = keyof TemplateSpecType | AnimationForceLiteral,
> {
    actions: (
        Key extends AnimationForceLiteral
            ? Lightning.types.AnimationActionSettings.Literal<
                Key<Key>,
                AnimationForceType<Key<Key>>,
            >
            : Key extends keyof TemplateSpecType
                ? Lightning.types.AnimationActionSettings.Literal<
                    Key<Key>,
                    ExtractAnimatableValueTypes<TemplateSpecType[Key<Key>]>,
                >
                : never
    )[];
    autostop?: boolean;
    delay?: number;
    duration: number;
    repeat?: number;
    repeatDelay?: number;
    repeatOffset?: number;
    stopDelay?: number;
    stopDuration?: number;
    stopMethod?: StopMethod;
}

Type Parameters

Properties

actions: (
    Key extends AnimationForceLiteral
        ? Lightning.types.AnimationActionSettings.Literal<
            Key<Key>,
            AnimationForceType<Key<Key>>,
        >
        : Key extends keyof TemplateSpecType
            ? Lightning.types.AnimationActionSettings.Literal<
                Key<Key>,
                ExtractAnimatableValueTypes<TemplateSpecType[Key<Key>]>,
            >
            : never
)[]

Animation Actions

Each member of this array defines how a particular property will animate during the animation's duration. Any number of properties may be animated at the same time.

[]

autostop?: boolean

Automatic Stop

If true, after the animation is finished, it is automatically stopped.

false

delay?: number

Delay (in seconds)

Number of seconds to delay an animation from actually beginning after it's triggered to start.

0

duration: number

Duration (in seconds)

Number of seconds to run the animation after any delay.

1

repeat?: number

Repeat Count

Number of times to repeat the animation after it finishes for the first time.

  • -1 = Repeat infinitely
  • 0 = Animate once, but do not repeat
  • >= 1 = Repeat animation this number of times

0

repeatDelay?: number

Repeat Delay (in seconds)

Number of seconds to delay every repeat of an animation.

0

repeatOffset?: number

Repeat Offset

A progress value between 0 and 1.0 where the animation will restart before each repeat.

0

stopDelay?: number

Stop Delay

Delay in seconds before stopping.

0

stopDuration?: number

Stop Duration

Duration in seconds of stopping

0 (use duration)

stopMethod?: StopMethod

Stop Method

Method that defines the behavior of the animation when it is stopped.

fade