logo

Utility Lab

React and NextJS
media file preview
Pagination
ScrollBar
Tooltip
logo

Utility Lab

scroll-to-future.svgscroll-to-future.svgScrollbar supporting both X and Y axes. Position settings for the start and end of the block. Custom positioning options (above or after the element). 20+ built-in themes

scroll-to-future

update 07/27/2026
Scrollbar supporting both X and Y axes. Position settings for the start and end of the block. Custom positioning options (above or after the element). 20+ built-in themes
Version - last 1.0.14 from 07/27/2026
1.0.14
07/27/2026
architectural overhaul

The scrollbar container rendering mode has been fundamentally reworked

1.0.13
07/26/2026
Fixed bugs

Fixed fatal error when resize viewport

1.0.12
07/26/2026
Fixed bugs

Fixed animations: the scrollbar now correctly appears when the viewport is resized

1.0.11
07/26/2026
Fixed bugs

Fixed positioning on viewport resize: the scrollbar now correctly appears when the viewport is resized

1.0.10
07/26/2026
Fixed bugs

Fixed positioning for mode 'after': the scrollbar now correctly appears after the element

1.0.9
07/25/2026
Fixed bugs

Fixed scrollbar behavior: the scrollbar now correctly hides when used in windows that extend beyond the viewport

1.0.8
07/21/2026
Fixed bugs

Removed methods that are no longer used

1.0.7
07/21/2026
Fixed bugs

Removed types that are no longer used

1.0.6
07/21/2026
Fixed bugs

Fixed tracking of parent changes for the element to which the scrollbar overlay is attached

1.0.5
07/20/2026
Fixed bugs

Removed functions that are no longer used

1.0.4
07/20/2026
Fixed bugs

Fixed the thumb position; addressed cases where the thumb did not correctly reach the end of the scroll area

1.0.3
07/19/2026
Fixed bugs

Joint behavior has been fixed when using both axes

1.0.2
07/19/2026
Fixed bugs

Fixed behavior when both axes are used simultaneously

1.0.1
07/19/2026
Fixed bugs

Fixed positioning for mode 'after'

1.0.0
07/19/2026
Publish

Created component

INSTALALTION
1npm i scroll-to-future
1yarn add scroll-to-future
1pnpm install scroll-to-future
HOW USE
EXAMPLE
1import { ScrollToFuture } from "scroll-to-future";
2import "scroll-to-future/style.css";
3
4export const App = () => {
5    return (
6        <div {/* scroll block **/}>
7            <ScrollToFuture />
8        </div>
9    )
10};
MIX THEME
1<ScrollToFuture
2    selectTheme="primary"
3    optionsTheme={{
4        scrollBar: {
5            inactive: {
6                backgroundColor: "rgba(255, 255, 255, 0.08)",
7                borderRadius: "999px",
8            },
9
10            hover: {
11                backgroundColor: "rgba(255, 255, 255, 0.16)",
12            },
13
14            active: {
15                backgroundColor: "rgba(255, 255, 255, 0.24)",
16            },
17        },
18
19        thumb: {
20            inactive: {
21                backgroundColor: "#8b5cf6",
22                borderRadius: "999px",
23            },
24
25            hover: {
26                backgroundColor: "#a78bfa",
27                transform: "scale(1.05)",
28            },
29
30            active: {
31                backgroundColor: "#ddd6fe",
32                transform: "scale(1.12)",
33            },
34        },
35    }}
36/>
Superimposition
Mode
Position mode
Height ScrollBar: 90%
Boundary Offset: 4px
ORBoundary Offset start: 2pxBoundary Offset end: 4px
Width Track: 12px
Select Theme
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc.
CODE OUTPUT
1import { ScrollToFuture } from "scroll-to-future";
2import "scroll-to-future/style.css";
3
4export const App = () => {
5    return (
6        <div className="scroll-block">
7            <ScrollToFuture
8            selectTheme="violet"
9            nativeOnMobile={false}
10            scrollBar={{
11                widthTrack: "12px",
12                positionMode: "after",
13                superimposition: "after",
14                mode: "vertical",
15                heightTrack: "90%",
16                boundaryOffset: "4px",
17            }}
18            />
19
20            {/* Scrollable content */}
21        </div>
22    );
23};