bga-animations
    Preparing search index...

    Interface AnimationSettings

    Settings to apply to an animation. Other animations can be run in parallel, using the same duration.

    interface AnimationSettings {
        animationsActive?: boolean | (() => boolean);
        duration?: number;
        easing?: string;
        fromPlaceholder?: "off" | "on" | "shrink";
        parallelAnimations?: ParallelAnimation[];
        preserveScale?: boolean;
        toPlaceholder?: "grow" | "off" | "on";
    }

    Hierarchy (View Summary)

    Index

    Properties

    animationsActive?: boolean | (() => boolean)

    A function returning a boolean, or a boolean, to know if animations are active.

    duration?: number

    The default animation duration, in ms (default: 500).

    easing?: string

    The CSS easing function, default 'ease-in-out'.

    fromPlaceholder?: "off" | "on" | "shrink"

    Determines the behavior of the placeholder at the starting position ("from") of the animation. Default: 'shrinking'.

    Options:

    • 'on': Keeps the placeholder occupying the full element's space until the animation completes.
    • 'off': Does not add a placeholder.
    • 'shrink': Gradually reduces the placeholder's size until it disappears.
    parallelAnimations?: ParallelAnimation[]

    Animations to play at the same time as the main animation

    preserveScale?: boolean

    Preserve the scale of the object when sliding in or out.

    toPlaceholder?: "grow" | "off" | "on"

    Determines the behavior of the placeholder at the ending position ("to") of the animation. Default: 'growing'.

    Options:

    • 'on': Keeps the placeholder occupying the full element's space until the animation completes.
    • 'off': Does not add a placeholder.
    • 'grow': Gradually increases the placeholder's size until it fully appears.