Know whether a scrollable row can scroll further and scroll it by a step, for carousels and tab lists.
This is custom React hooks, you need to follow the Basic Rules when you use it.
The buttons are disabled when the row cannot scroll further.
const useScroller = <T extends HTMLElement = HTMLElement>(
step?: number,
) => {
ref: RefObject<T | null>
canScrollStart: boolean
canScrollEnd: boolean
scrollBy: (direction: 'start' | 'end') => void
}