new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Mantine · all subjects

hooks/usescroller

9 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

useScroller hook overview

The use-scroller hook manages horizontal scroll behavior for a container element. It provides scroll state (whether content can be scrolled in either direction), scroll functions, and drag-to-scroll functionality.

useScroller scrollAmount option

The scrollAmount option controls how many pixels the content scrolls when scrollStart or scrollEnd functions are called. The default value is 200 pixels.

useScroller draggable option

The draggable option enables or disables drag-to-scroll functionality. When draggable is true (the default), users can click and drag to scroll the content.

useScroller onScrollStateChange callback

The onScrollStateChange callback is called when scroll state changes. It receives a UseScrollerScrollState object with canScrollStart and canScrollEnd boolean properties indicating whether content can be scrolled in either direction.

useScroller return value properties

The useScroller hook returns an object with the following properties: ref (RefCallback to attach to the scrollable container), canScrollStart (boolean), canScrollEnd (boolean), scrollStart (function), scrollEnd (function), isDragging (boolean indicating if user is currently dragging), and dragHandlers (object with onMouseDown, onMouseMove, onMouseUp, and onMouseLeave handlers to spread on the container).

useScroller function signature

useScroller is defined as: function useScroller<T extends HTMLElement = HTMLDivElement>(options?: UseScrollerOptions): UseScrollerReturnValue<T>;

useScroller exported types

The types UseScrollerOptions, UseScrollerReturnValue, and UseScrollerScrollState are exported from the @mantine/hooks package and can be imported for use in applications.

useScroller scroll state values

canScrollStart indicates whether content can be scrolled towards the start (left in LTR, right in RTL). canScrollEnd indicates whether content can be scrolled towards the end (right in LTR, left in RTL).

useScroller alternative: Scroller component

If a component API is preferred, the Scroller component provides the same functionality as the useScroller hook with additional styling and control button features.

Give your agent this brain