swipefeed
    Preparing search index...

    Interface SwipeDeckProps<T>

    interface SwipeDeckProps<T> {
        ariaLabel?: string;
        as?: ComponentType<unknown> | (keyof IntrinsicElements);
        children: (context: SwipeDeckRenderContext<T>) => ReactNode;
        className?: string;
        defaultIndex?: number;
        direction?: Direction;
        endReachedThreshold?: number;
        fullscreen?: boolean;
        gesture?: GestureConfig;
        index?: number;
        items: readonly T[];
        keyboard?: KeyboardConfig;
        keyboardNavigation?: boolean;
        loop?: boolean;
        onEndReached?: (
            info: { direction: "forward" | "backward"; distanceFromEnd: number },
        ) => void;
        onIndexChange?: (index: number, source: IndexChangeSource) => void;
        onItemActive?: (item: T, index: number) => void;
        onItemInactive?: (item: T, index: number) => void;
        orientation?: Orientation;
        preload?: number;
        preloadPrevious?: number;
        style?: CSSProperties;
        virtual?: VirtualConfig;
        visibility?: VisibilityConfig;
        wheel?: WheelConfig;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Properties

    ariaLabel?: string
    as?: ComponentType<unknown> | (keyof IntrinsicElements)
    children: (context: SwipeDeckRenderContext<T>) => ReactNode
    className?: string
    defaultIndex?: number
    direction?: Direction
    endReachedThreshold?: number
    fullscreen?: boolean

    If true, applies styles to make the deck take up the full view height (100dvh) and width (100%). Helpful for full-screen video feeds to handle browser UI (address bar) correctly.

    gesture?: GestureConfig
    index?: number
    items: readonly T[]
    keyboard?: KeyboardConfig
    keyboardNavigation?: boolean
    loop?: boolean
    onEndReached?: (
        info: { direction: "forward" | "backward"; distanceFromEnd: number },
    ) => void
    onIndexChange?: (index: number, source: IndexChangeSource) => void
    onItemActive?: (item: T, index: number) => void
    onItemInactive?: (item: T, index: number) => void
    orientation?: Orientation
    preload?: number
    preloadPrevious?: number
    style?: CSSProperties
    virtual?: VirtualConfig
    visibility?: VisibilityConfig
    wheel?: WheelConfig