Chat Viewer
    Preparing search index...

    Interface ScrollToItemOpts

    Options for scrolling to a specific index or message in the chat viewer.

    interface ScrollToItemOpts {
        align?: ScrollToIndexAlign;
        offset?: number;
        smooth?: boolean;
    }
    Index

    Properties

    align?: ScrollToIndexAlign

    Alignment of the item. Can be:

    • start: Align the item to the start of the list.
    • center: Align the item to the center of the list.
    • end: Align the item to the end of the list.
    • nearest: If the item is already completely visible, don't scroll. Otherwise scroll until it becomes visible. Default: "start".
    offset?: number

    Additional offset from the scrolled position. Default: 0.

    smooth?: boolean

    If true, scrolling animates smoothly. Use with caution for performance. Default: false.