Skip to content

Scroller

Free

A row that scrolls sideways, with a soft fade and a chevron at each edge that hides content.

  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 9, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Put the row in the content part, and add the two controls.

The sample also uses Tabs. One command adds them with this item:

project-tabs.tsx

Scroller

<div>
PropTypeDefaultDescription
classNamestring—
focusRing"inset""outside"—Where the focus ring sits when the Viewport has keyboard focus: outside (default) or inset, for a Scroll Area in a parent that clips or with a sticky child (scrollFocusVariants in #/lib/scroll-focus).
scrollAmountnumber—Pixels one press of a control scrolls. Default: 80% of the visible width.
dragScrollbooleanfalseScroll by a mouse drag on the row, as on touch. Off by default: a drag on a row of links or chips then also scrolls, and a press that moves more than 4px is not a click.
disabledbooleanfalseRender the children as they are: no scroll box, fades, or controls. For a row that scrolls only in one mode (a phone layout, a scroll prop), with one tree for both modes.
variant"plain""track""plain"track: the root draws the muted segmented track (Tabs default, Segmented Control) and the fade takes its color; the row's own child drops its fill, so one track shows and the scroll box never cuts it with square ends. plain (default): no surface.
rounded"default""full""default"The corner of the track: default (10px, the 32px track) or full (a pill).
From Base UIScrollArea.RootBase UI docs
overflowEdgeThreshold0The threshold in pixels that must be passed before the overflow edge attributes are applied. Accepts a single number for all edges or an object to configure them individually.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ScrollerContent

<div>
PropTypeDefaultDescription
classNamestring—Classes of the row inside the scroll box (gap, padding, alignment).
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ScrollerPrevious

<button>
PropTypeDefaultDescription
classNamestring—
busyboolean—The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading.
spinnerPlacement"center""start"—center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label.
keepVisibleboolean—Keep the button on screen when its side hides nothing, dimmed and not pressable, so a row of buttons does not jump. The fade still goes, so it never covers the first or last item.
glass"clear""dark""light"—
rounded"default""full"—
From Base UIButtonBase UI docs
focusableWhenDisabledbooleanfalseWhether the button should be focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

ScrollerNext

<button>
PropTypeDefaultDescription
classNamestring—
busyboolean—The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading.
spinnerPlacement"center""start"—center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label.
keepVisibleboolean—Keep the button on screen when its side hides nothing, dimmed and not pressable, so a row of buttons does not jump. The fade still goes, so it never covers the first or last item.
glass"clear""dark""light"—
rounded"default""full"—
From Base UIButtonBase UI docs
focusableWhenDisabledbooleanfalseWhether the button should be focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.
  • Put the row in ScrollerContent, and add ScrollerPrevious and ScrollerNext.
  • Use variant="track" for segmented Tabs or a Segmented Control: the root draws the track.
  • Use disabled for a row that scrolls only in one mode, such as a phone layout.
  • Use dragScroll when mouse users should drag the row as on touch.
  • To fold the items that do not fit into a menu, use the Overflow List.
  • For slides that move one stop at a time, use the Carousel.
Taborarrow keysMove focus in the row; the focused item scrolls into view.
Edge
hover · the fade and the chevron show and hide on opacity

Built with

Installs with Scroller

  1. AddedScroller, with Button, Scroll Area.
Open the release