Interface ScrollbarConfig

interface ScrollbarConfig {
    autoHide?: number;
    className?: string | string[];
    clickScroll?: boolean;
    dragScroll?: boolean;
    hideNative?: boolean;
    id?: string;
    onMobile?: boolean;
    positionH?: Offset;
    positionV?: Offset;
    useHandle?: boolean;
}

Properties

autoHide?: number

Auto-hide the scrollbar when there's no scrolling happening for the given number of milliseconds.

Set to 0 or a negative value to disable hiding.

className?: string | string[]

A class name or a list of class names of the scrollable element. Will result in the scrollable wrapper element that's created by us getting these classes.

See explanation for id.

undefined
clickScroll?: boolean

Whether to scroll the element when a user clicks anywhere on the scrollbar.

dragScroll?: boolean

Whether to scroll the element when a user drags the handle (if useHandle) or drags along anywhere on the scrollbar (if not useHandle).

hideNative?: boolean

Hide the native scroll bar.

Note that the LISN scrollbar is itself draggable/clickable so it can be used to scroll the element similar to the native scrollbar.

id?: string

The DOM ID of the scrollable element. Will result in the scrollable wrapper element that's created by us getting this ID.

IMPORTANT: If you've disabled settings.contentWrappingAllowed, then the scrollable element provided as the widget element will not have its content wrapped and will remain the actual scrollable. In this case, it's ID will be set to this, so if it already has an ID, it will be overridden with this value.

undefined
onMobile?: boolean

Whether to enable also on mobile and tablet devices. Detection is based on user agent.

positionH?: Offset

Where to place the scrollbar that tracks the horizontal scroll.

It does not need to be a horizontal position; it can for example be "left" or "right".

positionV?: Offset

Where to place the scrollbar that tracks the vertical scroll.

It does not need to be a vertical position; it can for example be "top" or "bottom".

useHandle?: boolean

Whether to use a traditional fixed-length handle (like the native scrollbar) to indicate the position or the default style of a fill (that starts at the beginning and ends at the scroll fraction).