swipefeed
    Preparing search index...

    Interface SwipeDeckAPI<T>

    interface SwipeDeckAPI<T> {
        canNext: boolean;
        canPrev: boolean;
        getItemProps: (
            index: number,
        ) => HTMLAttributes<HTMLElement> & {
            "data-active": boolean;
            "data-index": number;
            ref?: (instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly);
        };
        getViewportProps: () => HTMLAttributes<HTMLElement> & {
            ref: (
                instance: HTMLElement | null,
            ) => void | (() => VoidOrUndefinedOnly);
        };
        index: number;
        isAnimating: boolean;
        items: readonly T[];
        next: () => void;
        orientation: Orientation;
        prev: () => void;
        scrollTo: (index: number, options?: { behavior?: ScrollBehavior }) => void;
        totalSize: number;
        viewport: HTMLElement | null;
        virtualItems: SwipeDeckVirtualItem[];
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Properties

    canNext: boolean
    canPrev: boolean
    getItemProps: (
        index: number,
    ) => HTMLAttributes<HTMLElement> & {
        "data-active": boolean;
        "data-index": number;
        ref?: (instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly);
    }
    getViewportProps: () => HTMLAttributes<HTMLElement> & {
        ref: (
            instance: HTMLElement | null,
        ) => void | (() => VoidOrUndefinedOnly);
    }
    index: number
    isAnimating: boolean
    items: readonly T[]
    next: () => void
    orientation: Orientation
    prev: () => void
    scrollTo: (index: number, options?: { behavior?: ScrollBehavior }) => void
    totalSize: number
    viewport: HTMLElement | null
    virtualItems: SwipeDeckVirtualItem[]