bga-cards
    Preparing search index...

    Interface AddCardToSlotSettings

    interface AddCardToSlotSettings {
        animationsActive?: boolean | (() => boolean);
        autoUpdateCardNumber?: boolean;
        bump?: number;
        duration?: number;
        easing?: string;
        fadeIn?: boolean;
        finalSide?: "auto" | "front" | "back";
        forceToElement?: HTMLElement;
        fromElement?: HTMLElement;
        fromPlaceholder?: "off" | "on" | "shrink";
        fromStock?: CardStock<any>;
        index?: number;
        initialSide?: "auto" | "front" | "back";
        parallelAnimations?: ParallelAnimation[];
        preserveScale?: boolean;
        selectable?: boolean;
        slot?: SlotId;
        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.

    autoUpdateCardNumber?: boolean

    For counters. Indicate if the card count is automatically updated when a card is added or removed. Default true.

    bump?: number

    The scale bump to use in the middle of a slide animation, to fake an item grabbed from one place to the other. Default 1.2

    duration?: number

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

    easing?: string

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

    fadeIn?: boolean

    Indicates if we add a fade in effect when adding card (if it comes from an invisible or abstract element).

    finalSide?: "auto" | "front" | "back"

    Card side at the end of the animation. Default to initialSide.

    forceToElement?: HTMLElement
    fromElement?: HTMLElement

    The element to move the card from.

    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.
    fromStock?: CardStock<any>

    The stock to take the card. It will automatically remove the card from the other stock.

    index?: number

    Force card position. Default to end of list. Do not use if sort is defined, as it will override it.

    initialSide?: "auto" | "front" | "back"

    Card side at the beginning of the animation. Default 'auto' to isCardVisible. Ignored if the card already exists.

    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.

    selectable?: boolean

    Set if the card is selectable. Default is true, but will be ignored if the stock is not selectable.

    slot?: SlotId

    The slot to place the card on.

    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.