ScrollArea Pro

Advanced ScrollArea with auto-hide scrollbars, progress bars, and cross-axis scroll.

Words

Dream
Focus
Build
Learn
Create
Inspire
Explore
Grow
Adapt
Shine
Lead
Imagine
Evolve
Balance
Persist
Win
Reflect
Rise
Change
Thrive

Installation

npx shadcn@latest add https://scrollx-ui.vercel.app/registry/scroll-areapro.json 

Usage

import { ScrollAreaPro } from "@/components/ui/scroll-areapro"
<ScrollAreaPro
        className="w-96 rounded-md border whitespace-nowrap"
        crossDirectionalScroll
        showProgress="horizontal"
      >
        <div className="flex w-max space-x-4 p-4">
          {works.map((artwork) => (
            <figure key={artwork.artist} className="shrink-0">
              <div className="overflow-hidden rounded-md">
                <Image
                  src={artwork.art}
                  alt={`Photo by ${artwork.artist}`}
                  className="aspect-[3/4] object-cover grayscale"
                  width={300}
                  height={400}
                />
              </div>
              <figcaption className="pt-2 text-xs text-muted-foreground">
                Photo by{" "}
                <span className="font-semibold text-foreground">
                  {artwork.artist}
                </span>
              </figcaption>
            </figure>
          ))}
        </div>
      </ScrollAreaPro>

Examples


Horizontal

Photo by Lawrence Krowdeed
Photo by Lawrence Krowdeed
Photo by 烧不酥在上海 老的
Photo by 烧不酥在上海 老的
Photo by Hulki Okan Tabak
Photo by Hulki Okan Tabak
Photo by Sam Baroudi
Photo by Sam Baroudi

API Reference

ScrollArea Pro

Premium ScrollArea with dynamic scrollbars, smooth progress indicators, and cross-axis flow.

Props

PropertyTypeDefaultDescription
classNamestringundefined
Additional classes to style the ScrollAreaPro or ScrollBarPro container.
childrenReactNoderequired
Content inside the ScrollAreaPro viewport.
crossDirectionalScrollbooleanfalse
Allows horizontal scroll via vertical gestures (wheel/touch) on desktop devices.
autoHidebooleanfalse
Hides the scrollbars when not actively scrolling.
showProgress"horizontal" | "vertical"undefined
Shows a progress indicator. Horizontal at the bottom, vertical along the right.
onScrollChange(progress: { x: number; y: number }) => voidundefined
Callback fired when the scroll position changes. Returns scroll progress in X and Y axes.
orientation"vertical" | "horizontal""vertical"
Orientation of the ScrollBarPro (vertical or horizontal).
showbooleantrue
Controls whether the ScrollBarPro is visible.
isScrollingbooleanfalse
Indicates if the user is actively scrolling (used for animations).

Built withby Ahdeetai.