Skip to content

    Browse components

    Scroll Area

    Native scrolling with slim overlay scrollbars that fade in on hover or scroll, draggable thumbs and soft fading edges where there is more to see.

    Open
    Customize
    hover
    scroll
    always
    vertical
    horizontal
    both

    Installation

    npx shadcn@latest add @glint-ui/scroll-area

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/scroll-area.json

    Usage

    import { ScrollArea } from "@/components/ui/scroll-area";
    
    <ScrollArea className="h-72 w-56 rounded-xl border">
      {items.map((item) => <div key={item}>{item}</div>)}
    </ScrollArea>

    Props

    PropTypeDefaultDescription
    type"hover" | "scroll" | "always""hover"When the scrollbars are visible.
    orientation"vertical" | "horizontal" | "both""vertical"Scroll axes.
    fadebooleantrueFade content at edges with more to scroll.
    fadeSizenumber32Fade length in px.
    viewportClassNameReactNode—Classes for the scrolling viewport.
    classNamestring—Extra classes for the root element.